3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Display messages from twitter on the small screen

Step 2The 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!
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
0
Followers
1
Author:adunn