We’ve turned Meggy Jr RGB into a multicolor scrolling LED twitter reader. It’s a handy external ambient data device that displays things recently written by your friends on twitter.
This project was inspired in part by the excellent Twitter LED Scroller by David Nichols. The big idea is that we use a host computer to run a Processing application, which periodically checks Twitter for updates, and then sends “scrolling” data, one column at time, to the external LED display.
In this video (embedded above), we start out scrolling slowly and then advance to a faster rate by pressing buttons on the arrow keys on the laptop’s keyboard– interesting that you can still read it when it’s much faster, but it does take a moment to adjust to the faster speed. (We’ve posted a second video as well, that’s a little more “ambient.”)
As we have it configured here, the Meggy Jr scrolls through the 5 most recent tweets of folks that we follow, and then repeats. Between repeat cycles, if enough time has elapsed, it also checks to see if there are new updates. The history length (number of tweets to repeat) and time delay are adjustable, subject to Twitter query rate limits.
The physical setup is pretty straightforward– we hook up the Meggy Jr RGB to the computer with a USB-TTL cable. That’s the normal configuration for serial programming and serial communication. If you plan to run for an extended period of time, it would be a good idea to hook up the Meggy Jr to external DC power.
The software for this project is released under the GPL. You can download it here (31 kB .ZIP file)
The ZIP file consists of two parts, an Arduino sketch (that should be installed on the Meggy Jr RGB) and a Processing sketch (that runs on the host computer).
To try it out, download the code, install the Arduino sketch on the Meggy Jr RGB. Then configure and run the Processing sketch– several variables (user name, serial port, etc) need to be set before it can work.
There’s obviously a lot of potential for this sort of thing– the Meggy Jr can be mounted to the front of the computer and used to display almost anything, and the same thing could be done wirelessly through various means. Also interesting would be to use the Meggy Jr for other types of Twitter applications– displaying real-time search results, or monitoring a particular account for a particular event. Given the number of twittering devices out there, one could imagine a Meggy Jr RGB following the household plants, power usage, or cats and giving audible and visual alarms when certain conditions were met. It’s a simple matter of continuing to close the loop of social networking for embedded devices.
Acknowledgements & code sources
Big API’s, lots of code. As we said, this project was inspired by the Twitter LED Scroller by David Nichols, and part of the code design comes from that project. It uses the Twitter4j library and SimpleML library, as well as code from the Processing and Arduino serial communication examples by Tom Igoe. This discussion on the Processing forums was very helpful in showing how to put these parts together. The pixel font that we used is Liquid Mean.
The code that runs on the Meggy Jr itself was not modified much for this project; it’s a combination of the text scrolling and serial-receiving example programs, documented as part of our Meggy Jr RGB library for Arduino.