diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-02-10 03:52:45 +0000 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-02-10 04:04:24 +0000 |
| commit | afc385d3843b19b866f4f7c7b5287bae2d6b3b04 (patch) | |
| tree | bd407ae762526c5d9e9f53c03ee8ba1637be88aa | |
| parent | 5a3a6a533380a27f2221b2c81553286b5039ea7e (diff) | |
| -rw-r--r-- | README.md | 38 |
1 files changed, 32 insertions, 6 deletions
@@ -75,13 +75,13 @@ References: The repository includes a low-latency video streaming pipeline from libcamera to WebRTC, enabling browser-based video streaming directly from the Raspberry Pi camera. -### Installation +### Installation: Install required GStreamer packages: ```console user@alarm$ sudo pacman -S glib2 gstreamer gst-plugin-rswebrtc gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly ``` -### Testing +### Testing: Verify the pipeline works: ```console user@alarm$ gst-launch-1.0 libcamerasrc ! videoconvert ! vp8enc deadline=1 ! webrtcsink run-signalling-server=true @@ -112,7 +112,7 @@ user@alarm$ sudo i2cdetect -y 0 This repository includes INA226 voltage/current sensing via I2C. For battery-powered operation: -### Hardware Connections +### Hardware Connections: 1. Battery terminals: V+/V- on INA226 2. Load current path (Pi + motor controllers): I+/I- on INA226 3. I2C lines: SDA/SCL (GPIO 0/1) @@ -132,11 +132,37 @@ user@alarm$ sudo i2cdetect -y 0 70: -- -- -- -- -- -- -- -- ``` -## Build Instructions: -1. Install [`stack`](https://docs.haskellstack.org/en/stable/). It’s +## Build and Deploy Instructions: +### Requirements: +- Recommended: Raspberry Pi 5 with 4GB+ RAM for compilation +- Minimum: 1GB Pi for runtime-only deployment (ideal for robot MCU) + +### Build: +1. Install [`npm`](https://www.npmjs.com/) +2. Install [`stack`](https://docs.haskellstack.org/en/stable/). It’s recommended to use [`ghcup`](https://www.haskell.org/ghcup/) for installation. -2. Run `make` to compile the libraries and executables +3. Run `make client` to build web front-end +4. Run `make` to compile the libraries and executables > Note: You may need to install system dependencies on your host first > (e.g., `glib2`, `gstreamer`, `libcamera`, `libgpiod`, etc.) + +### Deploy: +Configure SSH access to your target host (e.g., `hsmouse` in `~/.ssh/config`), then: +```console +user@alarm$ make deploy +``` + +This deploys: + +- Executables to: `hsmouse:~/.local/bin/` +- Web client static files to: `hsmouse:~/Client/dist` + +### Running the Web Client: +After deployment, run the web client with the appropriate data directory: +```console +user@hsmouse$ hsm_web_datadir=~ hsm-web +``` + +> Note: The client expects static files at `${hsm_web_datadir}/Client/dist`. |
