docs: P4-Nano controller and simulator, users API, README screenshots

README, API, help, P4_NANO and the sub-READMEs now describe the ESP32-P4-Nano
controller and the simulator on it. API.md gains the users and permissions
routes; BENCH_TEST and SPECIFICATION are marked historical. Screenshots of the
simulator, sequence editor and pattern gallery. Graph rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-24 22:09:28 +13:00
1 parent 8756315a7b
commit e0c6c36996
32 files changed
+269751 -683

No files matched your search

+31 -7
View File
@@ -1,22 +1,40 @@
# led-controller
Controller for LED drivers on a Waveshare ESP32-P4-Nano: Ethernet, web UI, microphone beat detection and an ESP-NOW link to the drivers through the board's ESP32-C6 ([`docs/P4_NANO.md`](docs/P4_NANO.md)). The firmware is C (ESP-IDF) at the repository root; see [`docs/BENCH_TEST.md`](docs/BENCH_TEST.md) for the bench tests. The ESP32-S3 is only used as a bridge board now ([`bridge/`](bridge/README.md)).
Controller for LED drivers on a Waveshare ESP32-P4-Nano: Ethernet, web UI, microphone beat detection and an ESP-NOW link to the drivers through the board's ESP32-C6 ([`docs/P4_NANO.md`](docs/P4_NANO.md)). The firmware is C (ESP-IDF) at the repository root; [`docs/BENCH_TEST.md`](docs/BENCH_TEST.md) has the bench tests of the earlier ESP32-S3 controller. The ESP32-S3 is only used as a bridge board now ([`bridge/`](bridge/README.md)).
It keeps profiles, zones, presets, device groups, sequences, palettes, patterns and outputs in its flash, and serves the web UI and JSON API ([`docs/API.md`](docs/API.md)). Zones play to device groups. Sequences advance on the beats the microphone detects, or on a BPM clock while audio is stopped. Profiles, presets and sequences import and export as JSON bundles.
A simulated rig at `/sim/` (Menu > Simulator) shows every LED bar in the browser, driven by the same controller: on the board, in the desktop program and in Docker. See [`led-simulator/README.md`](led-simulator/README.md).
![The controller's zones and presets on the left, the simulated rig on the right playing a rainbow on 24 bars](docs/images/screenshots/simulator.png)
<table>
<tr>
<td><img src="docs/images/screenshots/sequence.png" alt="Sequence editor: eight lanes of clips on a timeline, with the preset browser"></td>
<td><img src="docs/images/screenshots/gallery.png" alt="Pattern gallery: every preset previewed as a strip of 119 LEDs"></td>
</tr>
<tr>
<td align="center">Sequence editor</td>
<td align="center">Pattern gallery (<code>/sim/gallery</code>)</td>
</tr>
</table>
## Build and flash
Clone with the submodules: `git clone --recurse-submodules <url>`, or `git submodule update --init` afterwards.
```bash
make build # minify the web UI from web/, then build the C6 radio and the controller (ESP-IDF in Docker)
make sim-wasm # once, and after led-driver changes: the simulator's drivers (Emscripten in Docker)
make build # minify the web UI from web/, pack the simulator, then build the C6 radio and the controller (ESP-IDF in Docker)
make flash # flash over USB (the controller and the C6 image)
make ota [HOST=<ip>] # update firmware (web UI included) over Ethernet, no USB (POST /ota); HOST defaults to 192.168.50.20
make monitor # serial console
make test # driver unit tests and the C/Python envelope cross-check
make test-envelope # the C and Python envelope packers must agree
make test-api HOST=<ip> # HTTP API tests against a running controller (its data is restored afterwards)
make test-browser HOST=<ip> # Selenium UI tests (needs selenium and chromedriver)
```
`make` lists every target. The web UI sources are in `web/` (`static/`, `templates/`, `audio.html`); `tools/build_web.sh` also packs the led-driver pattern files into the firmware, so the controller can send them to drivers.
`make` lists every target. The web UI sources are in `web/` (`static/`, `templates/`, `audio.html`); `tools/build_web.sh` also packs `led-driver/src/patterns/*.py` into the firmware when they exist; the C++ led-driver has none. For the same reason `make test` stops at `test-driver`: the MicroPython driver tests it ran are gone from `led-driver`.
## Desktop
@@ -24,17 +42,23 @@ The same controller runs as a program on Linux, with no ESP-IDF: `make desktop-r
## Other directories
- `led-driver/` (submodule): MicroPython firmware for the ESP32 LED drivers.
- `led-driver/` (submodule, branch `cpp`): C++ (ESP-IDF) firmware for the ESP32 LED drivers.
- `dmx-driver/` (submodule): DMX gateway (Art-Net and serial out).
- `led-tool/` (submodule): `led-cli`, configures drivers over serial and updates the controller over Ethernet (`led-cli --ota HOST`).
- `led-simulator/` (submodule), `espnow-sender/`: test helpers.
- `radio-c6/`: firmware of the P4-Nano's ESP32-C6 (esp-hosted plus ESP-NOW).
- `bridge/`: the USB/network ESP-NOW bridge board (ESP32-S3 or C3).
- `led-simulator/`: the simulated rig's page. `sim-driver/` builds led-driver to WebAssembly for it; `sim-controller/` is the controller for ESP-IDF's linux target, and holds the rig's server code.
- `fixture-driver/`: led-driver's engine built for the host, one process per DMX fixture (desktop).
- `espnow-sender/`: a test helper.
- `db/`: the records a controller starts with (the `default` profile and group the firmware seeds at first boot, plus pattern metadata), importable with `PUT /db/<name>`.
- `test/api/`: the API tests (`test/api/README.md`); `test/browser/`: the UI tests.
## Docs
- The board, its C6 radio, pins and partitions: `docs/P4_NANO.md`
- API reference: `docs/API.md`
- User guide: `docs/help.md` (`scripts/build_help_pdf.sh` regenerates `docs/help.pdf`)
- Specification: `docs/SPECIFICATION.md`
- Specification of the first, MicroPython system (historical): `docs/SPECIFICATION.md`
## Network