Twitter is a place to post brief updates on what's going on in your world. At a conference I recently attended, a LCD TV was used to "broadcast" updates from the organizers and attendees. This got me thinking...what about twitter for a (much) smaller screen?
And what's the point of all this? I'm not 100% sure. Who reads them? Why would people post their mundane daily doings, and why display them....there's no logical answer but for some reason it's addictive!
Step 1: The Hardware
The brains is a "system on module" called the TS-7400 from Technologic Systems. For less than $100 this little marvel runs Debian Linux and has a multitude of connectivity options: USB, ethernet, DAC, GPIO.
This project made use of one of the onboard serial UARTs. Both the TS-7400 and the uLCD have serial ports at logic (3.3v) levels. This makes wiring the two together a breeze as no interfacing circuitry is required.
Step 2: The Software
Getting the software setup...
1. Compile Ruby from the source on the board itself. Another benefit of the TS-7400 is that cross-compiling isn't usually needed, the CPU has enough horsepower to compile in place (if you have the patience)
2. Compile the Ruby serial port library. This provides the necessary hooks to communicate with the uLCD.
3. Install the ImageMagick suite and RMagick library to handle image manipulation. One of the trickier aspects of this project was converting each user's profile image. The uLCD has unusual expectations for pixel and colour data which means some extra logic to convert the jpeg's from twitter.
4. Write the ruby program...
The program uses the Twitter API to retrieve the public timeline in XML format. The XML document contains the latest posts to twitter at that point in time, and links to retrieve each user's profile pic. The code simply loops through each of the "twits", massages the image files and writes it out to the LCD over the serial port.
Update: Twitter API clients are springing up like mushrooms. I just noticed a Ruby Twitter client on RubyForge. Something like this would make the program even simpler!