This guide explains how to install the complete Between Threads system using the Orchestrator scripts.
The Between Threads project consists of three main components:
- RaspberryPi-Software: Backend service with servo control and WebSocket API
- Dashboard: Web interface for monitoring and control
- Live-Streaming: Camera streaming service for remote puppet monitoring
Run the following command to install everything automatically:
curl -LsSf https://raw.githubusercontent.com/Between-Threads-Project/Orchestrator/main/install.sh | bash-
Clone the Orchestrator repository:
git clone https://github.com/Between-Threads-Project/Orchestrator cd Orchestrator -
Make the script executable:
chmod +x install.sh
-
Run the installation:
./install.sh
- Creates application directory at
~/Desktop/BetweenThreads - Installs system dependencies (git, curl, wget, build-essential, python3, nodejs, npm)
- Installs uv (Python package manager)
- RaspberryPi-Software: Clones repo and installs Python dependencies
- Dashboard: Clones repo, installs npm dependencies, and builds production assets
- Live-Streaming: Clones repo and verifies Node.js streaming server
- Downloads, compiles, and installs the pigpio library for servo control
- Creates a systemd service for automatic pigpio daemon startup
Creates four systemd services:
pigpiod-custom.service: Runs the pigpio daemonbetween-threads.service: Runs the main backend servicebetween-threads-dashboard.service: Runs the web dashboardbetween-threads-livestream.service: Runs the camera streaming service
- Enables all services to start on boot
- Starts all services immediately
- Verifies service status
- Handles ffmpeg dependency for camera streaming
- Dashboard:
http://<raspberry-pi-ip>:3000 - API:
http://<raspberry-pi-ip>:8000 - Live Stream:
http://<raspberry-pi-ip>:8000 - UDP Ports: 5000, 5001 (for external hand recognition data)
Check service status:
sudo systemctl status pigpiod-custom
sudo systemctl status between-threads
sudo systemctl status between-threads-dashboard
sudo systemctl status between-threads-livestreamRestart services:
sudo systemctl restart pigpiod-custom
sudo systemctl restart between-threads
sudo systemctl restart between-threads-dashboard
sudo systemctl restart between-threads-livestreamView logs:
sudo journalctl -u between-threads -f
sudo journalctl -u between-threads-dashboard -f
sudo journalctl -u between-threads-livestream -fTo completely remove Between Threads:
curl -LsSf https://raw.githubusercontent.com/Between-Threads-Project/Orchestrator/main/uninstall.sh | bashOr manually:
cd Orchestrator
chmod +x uninstall.sh
./uninstall.shThe uninstall script will:
- Stop and disable all services
- Remove service files
- Delete the application directory
- Clean up the pigpio build directory
- Remove uv installation (optional)
pigpio daemon not running:
sudo systemctl restart pigpiod-customServo motors not moving:
- Check GPIO connections
- Verify power supply (5V)
- Check UDP data is being received on correct ports
Dashboard not accessible:
- Check if the service is running:
sudo systemctl status between-threads-dashboard - Verify Node.js is installed:
node --version - Check firewall settings
Permission issues: Ensure the script is run with sudo or that your user has passwordless sudo access.
External Hand-Recognition → UDP → RaspberryPi-Software → Servo Motors
↓
Dashboard ← WebSocket
↓
Live-Streaming ← Camera
- External Hand-Recognition sends UDP data to ports 5000/5001 (from separate laptop)
- RaspberryPi-Software controls servo motors via pigpio
- Dashboard connects to RaspberryPi-Software via WebSocket (port 8000)
- Dashboard provides user interface for monitoring and control
- Live-Streaming captures camera feed and serves MJPEG stream on port 8000
Edit ~/Desktop/BetweenThreads/RaspberryPi-Software/core/utils.py to modify:
- GPIO pin mappings
- Servo pulse width ranges
- UDP port configurations
Configuration is in the Next.js application files. Modify:
- API endpoints in environment variables
- UI components in the
app/directory
Edit the server.js file to modify:
- Camera device path (default:
/dev/video0) - Stream resolution and quality
- Port configuration (default: 8000)
- FFmpeg parameters for video encoding
- Raspberry Pi 3 Model B v1.2 (or compatible)
- Raspberry Pi OS (or any Linux distribution)
- Internet access for installation
- Administrative rights (sudo)
- PWM-compatible servo motors (e.g., SG90)
MIT License - See LICENSE.md for details.