Skip to content

Commit

Permalink
deploy: 1a81cb7
Browse files Browse the repository at this point in the history
  • Loading branch information
hugs committed Sep 10, 2024
0 parents commit 3f62e50
Show file tree
Hide file tree
Showing 63 changed files with 4,509 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
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 added .doctrees/config-os.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/getting-started.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/install-os.doctree
Binary file not shown.
Binary file added .doctrees/overview.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
valetnet.dev
Binary file added _images/admin-permission.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/apply-settings-question.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/choose-device.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/choose-edit-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/choose-next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/choose-os.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/choose-storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/continue-warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/general-settings-changed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/options-settings-changed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/raspberry-pi-os-imager-macos-1.8.5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/select-raspberry-pi-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/select-raspberry-pi-os-64-bit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/select-storage-device.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/services-settings-changed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/write-successful.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/writing-the-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions _sources/config-os.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 tapster@valet-vision.local
```

## Once connected, move to the Documents directory
```bash
cd ~/Documents
```

## Download the machine set-up script
```bash
curl -sL https://raw.githubusercontent.com/tapsterbot/valet/main/source/machine-setup.py -o machine-setup.py
```
## Run the set-up script:
**For Valet Link**:
```bash
python machine-setup.py --link
```
**For Valet Vision**:
```bash
python machine-setup.py --vision
```
***Note***: By default, Valet is set up as a Wi-Fi hotspot on first boot, to make it easier to connect to your main Wi-Fi network. If you want to disable this feature, include an additional flag:
```bash
python machine-setup.py --link --nohotspot
or
python machine-setup.py --vision --nohotspot
```


## 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/touch-support) 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
3 changes: 3 additions & 0 deletions _sources/getting-started.md.txt
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)
56 changes: 56 additions & 0 deletions _sources/index.rst.txt
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
116 changes: 116 additions & 0 deletions _sources/install-os.md.txt
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.
59 changes: 59 additions & 0 deletions _sources/overview.md.txt
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>
Loading

0 comments on commit 3f62e50

Please sign in to comment.