Required material:
- raspberry pi (tested on 2b and 3b+)
- APA102 or similar led strip
- Optional : a good power supply for the strip
- For playing with 3 leds, the raspberry 5V is sufficient.
Wiring:
Raspberry | APA102 led strip |
---|---|
2 | 5V |
6 | GND |
19 | DI |
23 | CI |
Enable the SPI functionality using raspi-config
then reboot
Turn led 1 in red, led 2 in green led 3 in blue:
echo "00000000 ff0000ff ff00ff00 ffff0000 00000000 00000000" | xxd -r -p > /dev/spidev0.0
And since A picture is worth a thousand words:
~~~
Question, remark, bug? Don't hesitate to contact me or report a bug.