Raspberry pi and SPI LED strip

Raspberry pi and SPI LED strip

ximport raspberry apa102

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.


Raspberry APA102 led strip
2 5V
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: Raspberry pi + APA102 strip


Question, remark, bug? Don't hesitate to contact me or report a bug.