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

+12 -8
View File
@@ -1,8 +1,9 @@
# led-controller on a desktop
The controller firmware (`main/`) built as a program for Linux: no ESP-IDF, no Docker, no board. The web
UI and API are the same as the board's. ESP-NOW goes through a bridge: the USB bridge board (`bridge/`)
or a UDP bridge such as `led-simulator`.
UI and API are the same as the board's. ESP-NOW goes through bridges: a USB bridge board (`bridge/`), a network
bridge (a bridge board with Ethernet, or the ESP32-P4-Nano controller at `192.168.50.20:8766`, see `docs/P4_NANO.md`),
DMX bridges, and the simulated rig at `/sim/` (`make sim-wasm` first; see `led-simulator/README.md`).
## Build and run
@@ -46,15 +47,17 @@ stable name, `/dev/led-bridge`, by its serial number.
## How it is built
`desktop/CMakeLists.txt` compiles the firmware's own sources (`main/`, and the host stand-ins in
`sim-controller/components/sim/`: mic, OTA, littlefs and the timers) with a small port of the ESP-IDF APIs
`desktop/CMakeLists.txt` compiles the firmware's own sources (`main/`, and the host stand-ins and the
simulated rig in `sim-controller/components/sim/`: OTA, littlefs, the timers, `sim_rig.c` and `sim_net.c`) with a small port of the ESP-IDF APIs
they use:
- `port/src/freertos.c`: tasks, queues, semaphores, stream buffers and event groups on POSIX threads.
- `port/src/esp_glue.c`: logging, error names, random numbers, the MAC (from the first real network
interface), restart (an exit, for the service manager), and the app description.
- `port/src/desktop_crypto.c`: SHA-1 and base64 for the WebSocket handshake.
- `port/src/www_pack.c`: the web UI pack (`www_dist/www.pack`) embedded in the program.
- `port/src/www_pack.c`, `sim_pack.c`: the web UI and simulator packs (`www_dist/www.pack`, `sim.pack`) embedded in the
program.
- `port/src/mic_alsa.c`, `mdns_host.c`: the microphone and the mDNS browser.
- `port/include/`: the headers. `sdkconfig.h` is the config the sim's build generated.
Third-party code is vendored in `third_party/`: the HTTP server and `http_parser` from ESP-IDF v6.1, and cJSON.
@@ -63,7 +66,8 @@ Third-party code is vendored in `third_party/`: the HTTP server and `http_parser
## Limits
- ESP-NOW needs the bridge. Without one the program runs, and its ESP-NOW frames go nowhere.
- The Wi-Fi drivers are not discovered automatically: their mDNS discovery is not in the desktop build yet.
- ESP-NOW needs a bridge. With none in the settings the program runs the `browser` bridge, so its frames only reach the
simulated rig.
- Firmware OTA is not available (the API answers 501, as in the simulator).
- The mic is simulated: beats come from the BPM clock, as in the simulator.
- The microphone is the computer's (ALSA) or a bridge board's. While audio is stopped, beats come from the BPM clock.
- Wi-Fi drivers are found over mDNS (`port/src/mdns_host.c`).