I got some of these NeoPixels and thought it might be fun to make them into Christmas lights using a Pi Zero. The first iteration wasn’t over-engineered enough, so this now features a Redis-backed Celery job queue
I have the data line for the NeoPixels connected to logical pin 18 (physical 12) on the Pi, but note that I had to connect this to the other end of the light string from where I connected the power, so I’ve effectively made a loop of lights. I couldn’t get anything to work with the data at the same end, or with the power at the other end. Possibly I’m doing something boneheaded, but it’s no big deal.
Of more interest is the fact that these LEDs are GRB, not RGB. Once again, no big deal, but I’m led to understand that it’s the luck of the draw which type you end up with.
Start with a bare-bones NOOBS 3.2 install of Raspbian Lite, then:
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
(I heard this can cause havoc with apt, but it seems to be OK)
sudo apt-get update
sudo apt install -y python3-pip redis
git clone https://github.com/pikesley/christmas-pixels
cd christmas-pixels
make build
docker-compose up
make # to run the tests
make push-code # to push the code to the Pi
Note that the second step here assumes your Pi is named xmas, you might need to sweeten to taste
cd xmas
make
And then you should probably reboot. Lights should start blinking when it comes back up, and it should be logging to /var/log/christmas-pixels-*
You should be able to see Swagger and Redoc API docs, thanks to FastAPI’s superpowers