Weekend Project - Ghost message!

Many years ago, I thought it’d be a fun idea to have an RGB panel that would display game sprites on demand, connected to the internet, so people could display a sprite on demand. Just a sort of fun thing to have on my desk. One evening last week, I decided that I wanted to make this thing happen, so I put together some simple software for the panel. Before too long, the software matured into a fun program for my coworkers – Ghost Message. I bought this 16×32 RGB LED panel from Adafruit several years ago. It turned out to require a fair amount of work to get displaying, and I lost interest after unsuccessful attempts. One very difficult part of the problem was wiring. The panel requires a dozen or so pins for clock, latch, three address pins, and two sets of R,G, and B channels. A bit after struggling with Arduino wiring, I had a Nootroopic Backpack manufactured by OSHpark. This reduced the problems to software. In the Nootropic demo, you can see several Pacman ghosts go back and forth. I found this delightful, and set off to replicate it. As I couldn’t find the code for the demo, I reviewed a couple of tutorials and forums on drawing sprites with the libraries for Arduino. You draw graphics on a matrix like this by telling the matrix which LEDs should be on, and which should be off. The easiest way (in my opinion) is to describe it in 8-bit bytes – that is, you layout which dots you want on or off with 0’s or 1’s. Because the ghost that I was making is 14-dots-wide, I needed to have two bytes for each line. When the graphics library read the bytes, it would ignore the last two bits.”


Related Content