CheerLights is a global network of synchronised lights that can be controlled by anyone. Tweeting a colour to the CheerLights Twitter account and talking to a bot on its Discord server are a couple of examples of ways that anyone can change the colour of all CheerLights installations globally to one of the several supported colours.
I decided to write my own small CheerLights display using the Pimoroni Unicorn Hat LED matrix connected to a Raspberry Pi. CheerLights provides different methods to get the latest colour information - I chose to use their MQTT server and store colour history in a Redis Stream.
This was the third project in my Things on Thursdays IoT live streaming series.
In this project, I showed how to show and track the current CheerLights colour on a Pimoroni Unicorn Hat connected to a Raspberry Pi. I subscribed to a topic on the CheerLights MQTT server, put the latest colour into a Redis Stream and consumed it on the Pi. The code is all in Python.
- CheerLights blog about this project
- Redis Streams - a free online course about the Redis Streams data type at Redis University.
- Source code for this project on GitHub.
Main photograph by Tony Hisgett on Wikimedia Commons.