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.
Nice work!
Hi,
again a nice idea! Unfortunately it´s not working here…processing is able to download the tweets but then debug output reads: Meggy Jr reports: Bad input values.
Already tried a different twitter-account and changed the HistoryLength and ScrollSpeed values but i´m still receiving this error.
Any ideas?
cheers
Jan
>processing is able to download the tweets but then debug output reads: Meggy Jr reports: Bad input values.
When it says "Meggy Jr reports: Bad input values," that means the Meggy Jr RGB is reporting a syntax error– which likely means that there is a problem in the serial communication between your computer and your Meggy Jr.
Some things to check: 1. That you have downloaded the correct sketch to the Meggy Jr RGB; the one included in the ZIP file with the processing app. If everything is correct, it should show a yellow blinking dot at power on, until you start the Processing app. 2. That nothing else is trying to communicate with the Meggy Jr– it might be helpful, for example, to quit the Arduino app. 3. Try turning Meggy Jr off and back on while it’s still hooked up to the computer by USB.
Since Processing is downloading the tweets and displaying them in the debug screen, then the twitter part is working fine, and changing accounts, history length, or scrollspeed won’t work. You might try out the "MeggyJr_RemoteDraw" Arduino/Processing combination as well– it’s nearly the same thing, but without Twitter involved– it just draws dots on the screen.
—
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
thanks for your hints! This issue was caused by the baud-rate setting for the usbserial port! Seems that the OS X FTDI drivers on my MacBook Pro we´re somehow overriding the speed-setting of any app. I´ve manually removed the drivers and installed the newest ones and now its working fine!
Strange however that i never noticed these problems, sketch upload with the same interface worked fine all the time…
cheers
Jan
you should do one on usb fans there really useful, or maybe ho to turn a reagulaar laser pointer into a high powerd laser.
Hi there!
Is current Twitter API and the programs still compatible? I’m looking to reusing some old hardware and would like to make this project.
Thanks!
I have not tested this recently, but it *did* survive the "big" API update some time ago. And, in principle, twitter API update changes should mostly be handled by changes to the Twitter4J library. If you try this and have trouble, please post about it in the forum, and we’ll try to get it straightened out.
We do have other future projects planned that do assume this is working, too. :)
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
Very okay indeed, I will have a look into it tomorrow, thank you very much for the fast response, Dr Who! Maybe I’ll create an account too then.
Regards, Gilbert.
I did unfortunately run into problems, and posted in the forum about it.