Clock / news ticker, on 32×32 RGB Matrix

video just doesn’t do it justice!

For literally years, I’ve wanted to start a project using a 32×32 RGB matrix, however they have been prohibitively expensive for some time. Granted you can still pay a fortune for them but I managed to pick this one up for £18 at Pimoroni, which isn’t cheap but still affordable… I no longer had an excuse, it was time to blow the dust off that old Raspberry Pi 2 that’s been in my parts draw!

I wanted something more than just a clock, so had a crack at a news ticker. In order to do that I had to use libcurl (to fetch an rss file from the internet) and libxml2 in order to parse it. While libcurl’s simple mode was indeed simple, I had a slightly harder time with libxml2 for some reason I found their API documentation a chore to navigate and extract information from, but then it is quite a complex library.

At first I extracted both the title and description of each rss post, however I quickly limited it to just the titles in the last 12 hours! Changing a text date to a form I could do maths on with the current date time was actually much easier than I thought it would be thanks to strptime and the rss standard date format…

There are two connection configurations for the adafruit “bonnet”, starting with the more convenient method, I did notice that there was some slight glitching when I was throwing lots of moving pixels at the LED’s. So despite this electronics project being a no electronics project! (seriously everything just plugs in and goes…) I did end up getting the soldering iron out to wire two pads together to use the “bonnet” in PWM mode. This does mean you have to disable analog sound, but that’s no great loss! There’s not many GPIO’s left over, but USB sound can be had for quite cheap if its needed. Recompiling the library to use PWM mode resulted in rock solid output, and while the video really doesn’t do it justice in real life the colours are bright and vibrant with the range of gradation being wide and smooth – can you tell I’m happy with it!

As each pixel cost me a whopping 1.75 pence !! I was determined to use all of them ! (tight, no Yorkshire!!!) to that end instead of clearing the off screen buffer each frame, I render a subtle dim plasma type effect. Even with this going on and animating the ticker itself and also the full date and time the PI 2 is only loaded to less than 75% of one core, this mean there should be room to run a web backend for settings and so forth – for example I’ll probably list the article links for the rss posts currently shown in the news ticker.

While initially you might think a resolution of just 32×32 is too small for a game, I think there are a number of simple arcade games that could be implemented with this display, obviously your space ship or whatever is likely only going to be a 3×2 caret (^) but do remember its not graphics that make great game play!

For sure if you’ve any interest in gadgets like this, I’d highly recommend you have a crack at a project like this….

Leave a Reply

Your email address will not be published.