APA102 LED on Raspberry PI control via Python REST API
650
Dockerized REST API for LED control on Raspberry Pi. Available on GitHub.
To make this work, attach a strip of two (or more) APA102 LEDs to Raspberry Pi GPIO pins:
And then run
docker pull fragaria/rpi-led-control && docker run -d --device /dev/gpiomem:/dev/gpiomem -p 5000:5000 -e NUM_LED=2 -e START_COLOR=16711680 fragaria/rpi-led-control
By sending the decimal color values via POST, you can control what colors the LEDs are. For color conversion, you can use this tool.
The LED positions are addressed from the start of the cable. Values are decimal color representation (0-16777215).
curl -X POST -d '{"leds":[20000, 255]}' -H "Content-Type: application/json" http://10.192.202.91:5000
Content type
Image
Digest
Size
50.7 MB
Last updated
almost 7 years ago
docker pull fragaria/rpi-led-control