What is it?
Lunar is one of my latest hobby projects. I’ve always been on the look out for other ways to make more high-fidelity ambient displays. Displays with the primary objective to just be beautiful objects in their environment. Obviously there are already many of these around; but usually cost a lot of money and significant computing power to operate. Which is fine in a one-off high-end context (e.g. a hotel lobby).
I read about low cost signage LED modules being available on AliExpress. As I searched around I found some pretty amazing libraries available for them running on Raspberry Pi’s and a new project was born.
The panel is made from a matrix of 3×6 LED panel with a 10mm LED pitch. I deliberately went for the biggest pitch out could find. Not only makes it a lot easier to make it large; but I also want to use the low res as a feature by designing patterns specifically for it. It’s not meant to be a high definition display.
Also made a little web app that you can use to connect to the device and tweak the effects. The panel can run different algorithms:
How it’s made
The panel is made using a 3×6 matrix of RGB LED Matrix panels with 10mm pitched LEDs (you can find many variants by searching for : LED RGB Matrix P10 on AliExpress).
It uses a Raspberry Pi 3 as central computing unit.
The metal panel interconnects have been made using my CNC milling machine. The modules running around the perimeter were 3D printed.
I wanted to get to know Python a bit better; so I used that as the main platform. In hindsight this probably wasn’t the best choice; yet being a bit creative it did eventually work out. Python is just too slow to do these kinds of things. (Or I’m just too noob at this to know how to do it right ;)) So, as I gradually found out; just re-rendering the entire frame; frame by frame isn’t going to work; even with the limited about of pixels in this display.
Yet if you use external C-based libraries you can do some quite cool, smooth animations anyway. By using an image in as a buffer and manipulating only a few pixels per frame from Python and having to the C(++)-based libraries doing the heavy-lifting it worked out pretty well. (I used PIL as a image library and numpy to do some other specific operations (e.g. transforming of matrix and gamma adjustments). hzeller’s library can copy an image from python to the panel really efficiently.
I used Flask to create the API and used the integrated ninja templating to create the web app. It just runs the basic dev webserver that comes with Flask.
To run the display I used Henner Zeller’s fantastic RGB Matrix library. Be sure to check it out of you’d like to build something similar. He’s got a great write-up of all you need to get going here:
https://github.com/hzeller/rpi-rgb-led-matrix