So one day I was scrolling through Facebook and came across an ad for a “NYC Train Sign” company. They make signs that a similar to the signs that you’ll see at a metro station or any train station really and I thought they were the coolest thing. The company advertised that they could show what’s currently playing on Spotify or notify you of when your Uber will arrive. Well I knew these were (at the time) open APIs and I had a feeling I knew how to replicate this project so I set out to save $180 and replicate this sign on my own.
I started, as anyone does, with research. I found the matrices at the Adafruit website and they had a great tutorial on how to wire them up with an adueno computer, which is smaller than a raspberry pi. Well, since I’m such an RPI fan, I decided to go with the pi instead of the adueno. I purchased everything they said I needed in the kit and then played the waiting game.
While waiting, I began researching how to actually display text on the screen. One would think that I would have researched this before I spent the money purchasing the hardware but I have made impulsive purchases before and this wouldn’t be the first time. I came across hzeller/rpi-rgb-led-matrix‘s C library that was explicitly written for someone like me, trying to get screens to display text from a RPI. it turns out, however, that this library was only written in C. There was a port of this library into node which I know, but it appears the project was no longer supported.
Finally the hardware was delivered!
First thing I did was install and configure Ubuntu server on the RPI. I configured it with a static WiFi IP address of 192.168.1.175 so I could always access it if I needed to while it was in operation, and it was easy to remember because it was just 5 addresses away from my main servers’ address.
I then updated the software and installed the development tools so I could compile the C library.
Then, I soldered the power connections together and wired it to the adapter plug. I then plugged it into the adapter and then into the power… no sparks! So I knew I was on the right path. (Seen to the left)
Next, I disconnected everything and took it to the kitchen table so I could wire the GPIO to the first screens input. Took about 30 min to make sure I had all the pins in the right place, but I’m also a perfectionist so I had to make sure they were right… which they weren’t. More on that in a few.
I reconnected everything back to power and attempted to build one of the demo applications and wala! I had: the clock!
Now I tried to flex my C muscle not having done any work in C before, but I was sure I could pull something together. The problem was that my goal was to ambitious for my knowledge in C and I found myself giving up.
Enter the easybotics/node-rpi-rgb-led-matrix project. I found this project after scouring the internet to find a replacement for the C library that would have taken me hours to learn and build what I was trying to do.
I created an infinite while loop and using momentjs, I started with just a clock:
Additions to the screen include an SQS queue to receive messages from different services. These services include my Radarr and Sonarr setup, notifications when the bathroom door closes and opens, notifying us if the bathroom is occupied with room to grow.