D3
D4
C16
C30
← → to move between modules
05 / 09 · Light
Addressable RGB
Two WS2812B-compatible LEDs daisy-chained off a single pin.
- LEDs
- 2 × XL-0807RGBC-2812B
- Protocol
- WS2812B, single wire
- Pin
- GPIO2
- Placement
- Right edge, front
GPIO2 drives D3; D3 passes its DOUT into D4. One pin, two independently addressable pixels, 24 bits of colour each.
There is no hardware peripheral in the loop — the test firmware bit-bangs the WS2812 waveform directly against the GPIO registers, with interrupts held off for the duration of the frame, because the protocol has no clock and the timing budget is a few hundred nanoseconds per bit.
Both LEDs are on the front face along the right edge, so they read as accent lighting either side of the display.
Pins
| Pin | Net | Role | Function |
|---|---|---|---|
| GPIO2 | I02 | WS2812 | Data into D3; D3 DOUT daisy-chains into D4. |
Parts
- D3 XL-0807RGBC-2812B First pixel in the chain
- D4 XL-0807RGBC-2812B Second pixel, fed from D3 DOUT
- C16 / C30 100n Supply decoupling, one per LED
Firmware
constexpr int PIN_RGB = 2;
constexpr uint8_t LED_BRIGHTNESS = 72;