-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4996a13
Showing
63 changed files
with
4,463 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 28d7a36e2aa4f326f827660def3e5019 | ||
tags: d77d1c0d9ca2f4c8421862c7c5a0d620 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
valetnet.dev |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# How to Configure Raspberry Pi OS for Valet | ||
|
||
## Connect to Valet | ||
Use username and password from [Raspberry Pi Imager settings](install-os.md#a-general-settings) | ||
```bash | ||
ssh [email protected] | ||
``` | ||
|
||
## Once connected to Valet, run this script: | ||
```bash | ||
curl -sL https://raw.githubusercontent.com/tapsterbot/valet/main/source/machine-setup.py | python3 | ||
``` | ||
|
||
## What does the script do? | ||
- Run raspi-config: | ||
- Enable VNC for remote desktop access | ||
- (*Valet Vision*): Enable SPI to control the TFT display | ||
- (*Valet Vision*): Enable I2C to control the TFT display | ||
- Create Python virtual environment | ||
- Install required Python libraries | ||
- Install libcamera libraries | ||
- Install OpenCV for computer vision | ||
- Install Tesseract OCR and Pytesseract for text recognition | ||
- Install [zero-hid](https://github.com/tapsterbot/zero-hid/tree/dev) library for mouse & keyboard control | ||
- Install [Checkbox server](https://github.com/tapsterbot/checkbox-server) | ||
- Install [Checkbox client](https://github.com/tapsterbot/checkbox-client-python) | ||
- (*Optional*): Install [Comitup](https://github.com/davesteele/comitup) for easy Wi-Fi onboarding | ||
|
||
### Valet Vision Only | ||
- Install [Blinka](https://github.com/adafruit/Adafruit_Blinka) library (for controlling TFT display) | ||
- Install [Checkbox display server](https://github.com/tapsterbot/checkbox-display-server) | ||
- Install TFT display test script | ||
|
||
### Valet Link Only | ||
- Set required video capture settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Getting Started with Valet | ||
- [Install OS](install-os.md) | ||
- [Configure OS](config-os.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
:layout: landing | ||
:description: Valet by Tapster is a plug-and-play automation tool designed for mobile devices. | ||
|
||
Valet | ||
======= | ||
|
||
.. rst-class:: lead | ||
|
||
A plug-and-play automation tool designed for mobile devices | ||
|
||
.. container:: buttons | ||
|
||
`Docs <getting-started>`_ | ||
`GitHub <https://github.com/tapsterbot/valet>`_ | ||
|
||
.. grid:: 1 1 2 3 | ||
:gutter: 2 | ||
:padding: 0 | ||
:class-row: surface | ||
|
||
.. grid-item-card:: :octicon:`pencil` Authentic inputs | ||
|
||
USB OTG HID interface for tapping, clicking, and typing inputs. | ||
|
||
.. grid-item-card:: :octicon:`eye` Vision testing | ||
|
||
OpenCV preinstalled. Compatible with other image detection AI or machine learning libraries. | ||
|
||
.. grid-item-card:: :octicon:`arrow-switch` Toggle connections | ||
|
||
Users can switch on / off Bluetooth, WiFI, Mobile Data. | ||
|
||
.. grid-item-card:: :octicon:`copilot` Drive any smartphone | ||
|
||
iOS and Android phones supported. | ||
|
||
.. grid-item-card:: :octicon:`sync` Switch apps | ||
|
||
Switch between apps and native features easily. | ||
|
||
.. grid-item-card:: :octicon:`people` Raspberry Pi-powered | ||
|
||
Benefit from the versatile Pi platform and its robust community. | ||
|
||
|
||
.. toctree:: | ||
:caption: Getting started | ||
|
||
getting-started.md | ||
install-os.md | ||
config-os.md | ||
|
||
.. toctree:: | ||
:caption: Explanation | ||
|
||
overview.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# How to Install Raspberry Pi OS on an SD Card | ||
|
||
## Materials Needed: | ||
- Raspberry Pi 4 (minimum 4GB RAM, 8GB recommended) | ||
- MicroSD Card ([Samsung PRO Endurance](https://www.samsung.com/us/computing/memory-storage/memory-cards/pro-endurance-adapter-microsdxc-64gb-mb-mj64ka-am/), 64GB recommended) | ||
- MicroSD Card reader | ||
|
||
## Instructions: | ||
|
||
### 1. Download Raspberry Pi Imager | ||
- Visit the [Raspberry Pi Imager download page](https://www.raspberrypi.com/software/). | ||
- Download and install the software for your operating system (Windows, macOS, or Linux). | ||
|
||
### 2. Prepare the SD Card | ||
- Insert your MicroSD card into the card reader and connect it to your computer. | ||
|
||
### 3. Launch Raspberry Pi Imager | ||
- Open the Raspberry Pi Imager application. | ||
![Raspberry Pi Imager](./images/raspberry-pi-os-imager-macos-1.8.5.png) | ||
|
||
<hr> | ||
|
||
### 4. Select the Device | ||
- Click on **CHOOSE DEVICE**. | ||
![Choose Device](./images/choose-device.png) | ||
- Select **Raspberry Pi 4**. | ||
![Select Raspberry Pi 4](./images/select-raspberry-pi-4.png) | ||
|
||
<hr> | ||
|
||
### 5. Select the OS | ||
- Click on **CHOOSE OS**. | ||
![Choose OS](./images/choose-os.png) | ||
- Select **Raspberry Pi OS (64-bit)**. | ||
![Select Raspberry Pi OS 64-bit](./images/select-raspberry-pi-os-64-bit.png) | ||
|
||
<hr> | ||
|
||
### 6. Select the Storage | ||
- Click on **CHOOSE STORAGE**. | ||
![Choose STORAGE](./images/choose-storage.png) | ||
- Select your MicroSD card from the list. | ||
![Select MicroSD card](./images/select-storage-device.png) | ||
|
||
<hr> | ||
|
||
### 7. Edit Settings | ||
- Click on **NEXT**. | ||
![Choose NEXT](./images/choose-next.png) | ||
- Click on **EDIT SETTINGS**. | ||
![Choose EDIT SETTINGS](./images/choose-edit-settings.png) | ||
|
||
|
||
### 7a. General Settings | ||
- Select the **GENERAL** tab and make the following changes: | ||
- Set hostname to **valet-vision**, **valet-link**, (or some other preferred name). | ||
:::{note} | ||
If you will have more than one Valet on your network, we recommened adding a number after the hostname (e.g. "valet-vision-34"). | ||
::: | ||
- Set the username to **tapster**. | ||
- Enter a password and store it somewhere safe, like a password manager. | ||
- If you'll be using a *wireless* network connection with your Valet, enter SSID and Wi-Fi password. However, if you'll be using a *wired* network connection, then leave "Configure wireless LAN" unselected and the SSID and password fields blank. | ||
:::{note} | ||
In the default installation, we do not set Wi-Fi credentials here with Raspberry Pi Imager; instead, we use _[Comitup](https://davesteele.github.io/comitup/)_ to bootstrap Wi-Fi support. However, the use of Comitup is configurable, and can be disabled when the system set-up scripts are run in a later step. If you really would rather set up Wi-Fi here, though, go for it! | ||
::: | ||
- *(Optional)* Set locale settings for your preferred time zone and keyboard layout. | ||
![Choose GENERAL tab](./images/general-settings-changed.png) | ||
|
||
<hr> | ||
|
||
### 7b. Services Settings | ||
- Select the **SERVICES** tab. | ||
- Enable SSH and select "Use password authentication". | ||
:::{note} | ||
You can also enable key-based authentication later after logging into Valet. | ||
::: | ||
![Choose SERVICES tab](./images/services-settings-changed.png) | ||
|
||
### 7c. Options Settings | ||
- Select the **OPTIONS** tab. | ||
- If desired, deselect "Enable telemetry". | ||
:::{note} | ||
Information about the telemetry collected by Raspberry Pi Imager can be found the projects's [README](https://github.com/raspberrypi/rpi-imager/blob/qml/README.md#telemetry). | ||
|
||
Raspberry Pi Imager's collected stats are available at [https://rpi-imager-stats.raspberrypi.com/](https://rpi-imager-stats.raspberrypi.com/). | ||
::: | ||
![Choose OPTIONS tab](./images/options-settings-changed.png) | ||
|
||
|
||
### 7d. Save Settings | ||
- When you're done making changes to the settings, click on **SAVE**. | ||
|
||
### 7e. Apply Settings | ||
- When asked "Would you like to apply OS customization setttings?", click **YES**. | ||
![Apply Settings?](./images/apply-settings-question.png) | ||
|
||
### 8. Write the OS to the SD Card | ||
- When asked "Are you sure you want to continue", click **YES** to continue. | ||
![Continue?](./images/continue-warning.png) | ||
- If you're shown an admin prompt, grant the Imager permission to continue. | ||
![Admin Permission](./images/admin-permission.png) | ||
- Wait for the writing process to complete; this may take a few minutes. | ||
![Write the Image](./images/writing-the-image.png) | ||
|
||
### 9. Safely Eject the SD Card | ||
- After the writing process is complete, click **CONTNIUE** and safely eject the SD card from your computer. | ||
![Write Successful](./images/write-successful.png) | ||
|
||
|
||
### 10. Boot Up Your Valet | ||
- Insert the MicroSD card into the Valet's Raspberry Pi. | ||
- (Optional) If no wireless connection was configured, connect a wired network cable to the Valet. | ||
- Connect the Valet to a power supply. | ||
|
||
### 🎉 Well done! | ||
Well, almost! Your Valet's Raspberry Pi is now running Raspberry Pi OS, but next we need to install Valet specific software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<style> | ||
div.mermaid { | ||
background: #ffffff; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
# Architecture Overview | ||
|
||
Here's a sequence diagram showing the important parts and how they talk to each other: | ||
|
||
```{mermaid} | ||
sequenceDiagram | ||
%%box rgb(245, 245, 245) | ||
participant C as Client Automation Script | ||
%%end | ||
box rgb(245, 245, 245) Tapster Valet | ||
participant DS as Display Server | ||
participant TFT as TFT Display | ||
participant S as Checkbox Server | ||
participant CM as Camera / Video Capture | ||
end | ||
participant 📱 as Smartphone | ||
|
||
C->>DS: Show text "Running a Demo" | ||
DS->>TFT: Show text "Running a Demo" | ||
DS-->>C: OK! | ||
C->>S: Take snapshot | ||
S->>CM: Take snapshot | ||
CM-->>S: Image bytes (binary) | ||
S-->>C: Image bytes (.png) | ||
C->>C: Look for text (Tesseract) | ||
C->>C: Look for a button (OpenCV) | ||
C->>S: Move pointer to (x=100, y=100) | ||
S->>📱: Move pointer to (x=100, y=100) | ||
S-->>C: OK! | ||
C->>S: Send keys "Hello, World!" | ||
S->>📱: Send keys "Hello, World!" | ||
S-->>C: OK! | ||
C->>DS: Show text "Done ✅" | ||
DS->>TFT: Show text "Done ✅" | ||
DS-->>C: OK! | ||
``` | ||
|
||
<script> | ||
var drawing = document.getElementsByClassName('mermaid')[0] | ||
|
||
function toggleFullscreen() { | ||
if (!document.fullscreenElement) { | ||
drawing.requestFullscreen() | ||
} else { | ||
if (document.exitFullscreen) { | ||
document.exitFullscreen() | ||
} | ||
} | ||
} | ||
|
||
drawing.addEventListener('click', toggleFullscreen) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// @ts-check | ||
|
||
// Extra JS capability for selected tabs to be synced | ||
// The selection is stored in local storage so that it persists across page loads. | ||
|
||
/** | ||
* @type {Record<string, HTMLElement[]>} | ||
*/ | ||
let sd_id_to_elements = {}; | ||
const storageKeyPrefix = "sphinx-design-tab-id-"; | ||
|
||
/** | ||
* Create a key for a tab element. | ||
* @param {HTMLElement} el - The tab element. | ||
* @returns {[string, string, string] | null} - The key. | ||
* | ||
*/ | ||
function create_key(el) { | ||
let syncId = el.getAttribute("data-sync-id"); | ||
let syncGroup = el.getAttribute("data-sync-group"); | ||
if (!syncId || !syncGroup) return null; | ||
return [syncGroup, syncId, syncGroup + "--" + syncId]; | ||
} | ||
|
||
/** | ||
* Initialize the tab selection. | ||
* | ||
*/ | ||
function ready() { | ||
// Find all tabs with sync data | ||
|
||
/** @type {string[]} */ | ||
let groups = []; | ||
|
||
document.querySelectorAll(".sd-tab-label").forEach((label) => { | ||
if (label instanceof HTMLElement) { | ||
let data = create_key(label); | ||
if (data) { | ||
let [group, id, key] = data; | ||
|
||
// add click event listener | ||
// @ts-ignore | ||
label.onclick = onSDLabelClick; | ||
|
||
// store map of key to elements | ||
if (!sd_id_to_elements[key]) { | ||
sd_id_to_elements[key] = []; | ||
} | ||
sd_id_to_elements[key].push(label); | ||
|
||
if (groups.indexOf(group) === -1) { | ||
groups.push(group); | ||
// Check if a specific tab has been selected via URL parameter | ||
const tabParam = new URLSearchParams(window.location.search).get( | ||
group | ||
); | ||
if (tabParam) { | ||
console.log( | ||
"sphinx-design: Selecting tab id for group '" + | ||
group + | ||
"' from URL parameter: " + | ||
tabParam | ||
); | ||
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); | ||
} | ||
} | ||
|
||
// Check is a specific tab has been selected previously | ||
let previousId = window.sessionStorage.getItem( | ||
storageKeyPrefix + group | ||
); | ||
if (previousId === id) { | ||
// console.log( | ||
// "sphinx-design: Selecting tab from session storage: " + id | ||
// ); | ||
// @ts-ignore | ||
label.previousElementSibling.checked = true; | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Activate other tabs with the same sync id. | ||
* | ||
* @this {HTMLElement} - The element that was clicked. | ||
*/ | ||
function onSDLabelClick() { | ||
let data = create_key(this); | ||
if (!data) return; | ||
let [group, id, key] = data; | ||
for (const label of sd_id_to_elements[key]) { | ||
if (label === this) continue; | ||
// @ts-ignore | ||
label.previousElementSibling.checked = true; | ||
} | ||
window.sessionStorage.setItem(storageKeyPrefix + group, id); | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", ready, false); |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.