f7beac2095685ab47f38bcbcd56b912042bfa04e
Ship UDP RGB panel firmware (eight WS2812 strips) and drop the ESP32 Wi-Fi/MicroPython stack. Co-authored-by: Cursor <cursoragent@cursor.com>
Portal panel firmware (Pico + W5500 + WS2812)
UDP RGB panel adapter for the portal project. Host renders patterns; this firmware only receives frames on UDP 50007.
Layout
led-driver-8/
├── firmware/ # Pico SDK C + W5500
├── examples/test_strips.py
├── .env.example
└── README.md
Hardware
| Signal | GPIO |
|---|---|
| W5500 CS | GP13 |
| SPI1 SCK | GP10 |
| SPI1 MOSI | GP11 |
| SPI1 MISO | GP12 |
| W5500 RST | GP9 |
| Status LED | GP25 |
| WS2812 strip 0–7 | GP18, 19, 20, 21, 22, 26, 27, 28 |
Eight strips (one PIO SM each). Pixel output uses DMA → PIO. Pixel count comes from each UDP frame. MAX_LEDS (512) is capacity only.
Build / flash
cd firmware
make deploy PANEL_ID=0
make reset && make monitor
Network options live in .env (see .env.example):
PANEL_ID=0
NETWORK=static
IP=10.1.1.10
NETMASK=255.255.255.0
GATEWAY=10.1.1.1
DNS=10.1.1.1
| Panel | IP | MAC last byte |
|---|---|---|
| 0 | 10.1.1.10 | 00 |
| … | … | … |
| 4 | 10.1.1.14 | 04 |
| 255 (bench) | 10.1.1.19 | FF |
Test
Self-contained (stdlib only):
python3 examples/test_strips.py
python3 examples/test_strips.py --host 10.1.1.10 --leds 64
Lights each strip alone with a unique colour, then flashes all strips R/G/B/white.
UDP protocol (port 50007)
| Payload | Action |
|---|---|
| N×3 bytes | Raw RGB → strip 0 |
| 1 + N×3 bytes | strip_id + RGB (0–7, or 255 = all) |
5 bytes PIN\0 + gpio |
Bind strip 0 |
8 bytes PIN\0 + strip + gpio + len_lo + len_hi |
Bind strip |
4 bytes SHOW |
Reserved |
Languages
C
46.1%
C++
29.3%
Makefile
12.6%
CMake
12%