This prototype uses an embedded system and colour LCD screen to display messages from twitter.com. It was a fun way to learn Ruby programming, as well programming against this little LCD.

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 screen is the 'uLCD-128' from 4D Systems. I bought mine online from a company called Dontronics. This version has an extra 1MB of flash memory onboard, but it's not used in this prototype. The LCD has a serial interface and a well documented API, which makes interfacing quite easy.

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

I've recently been learning the Ruby programming language, but needed something "real" to try it out on. Usually embedded systems are limited in languages to assembly or C. The TS-7400 is just that little bit bigger, runs Debian Linux and so has no problem with a language like Ruby. For that matter it could be done in C, Java, Perl or pretty much whatever language you chose - as long as you can run it on Linux.

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!
can i use a cell phone screen or a pda screen with this to read Ebooks?
that is awesome... i would definately buy one of these if it was low price and displayed on an old pc screen or a tv.
we have the board to save messenges and pictures,and cartons ,can be connected to LCD screen or LCD TV to display.
Good work! It is just like the LCD Advertising Displayers!. I have saw just the same things, a board connected to the LCD TV ,and The LCD TV will show the pictures or flashs automaticlly.
Could these screens be adapted to receive an RCA input?
No I don't think so - at least not easily. Out of the box the screens have a serial interface and don't accept a video signal. It is possible to load static images and have the screen 'animate' them but I'd guess thats not what you have in mind.
We have a name and a website now for our USB Flash Drive Editor: Includer: <a rel="nofollow" href="http://www.includer.org">http://www.includer.org</a><br/>
Adunn, this is helpful and relevant for my own dream to build a USB Flash Drive Editor for use especially in Africa so that people could work with emails offline and at home rather than at an Internet Cafe. <a rel="nofollow" href="http://www.worknets.org/wiki.cgi?FlashDriveEditor">http://www.worknets.org/wiki.cgi?FlashDriveEditor</a> What would you recommend if we wanted to do this with a less expensive and larger monochrome display? And the TS-7400 is great to know about but I wonder if there is a less expensive approach? Although this is a great start. Even a $300 flash drive editor would be more useful in electricity-poor Africa than a $200 laptop, I think. But it would be great if we could get the price down to $100 or ultimately $30 for a display plus USB ports to which we could plug in flash drives and a keyboard. I invite anybody interested to please join us at our Minciu Sodas <a rel="nofollow" href="http://www.ms.lt">http://www.ms.lt</a> laboratory's working group <a rel="nofollow" href="http://groups.yahoo.com/group/mendenyo/">http://groups.yahoo.com/group/mendenyo/</a> led by Samwel Kongere of Rusinga Island, Kenya. Andrius Kulikauskas, ms@ms.lt<br/>
I don't get twitter. It seems like the type of thing that would want to make a person give up on life. If I wanted to know what my friend was doing every 5 minutes, I would go spend the day with them.
These little uLCD modules are pretty good. Dontronics also have uOLED modules which look even better, although they have a bit of flicker. FYI Dontronics/4d systems also have something called a uVGA module, which apparently gives a VGA interface to a uController....though I haven't tried one out.

About This Instructable




More by adunn:Display messages from twitter on the small screen 
Add instructable to: