Today’s episode continues the description of a little robot car which “prints” Twitter messages on a glow-in-the-dark surface.
The last missing piece was the Twitter interface. I implemented it in Tcl/Tk using JeeMon.
Here’s the setup we’re using:
The idea is to search Twitter every 30 seconds for a specific search term, and then send the message into the air using a JeeLink.
This is the main code, i.e. application.tcl:
It uses a custom rig (i.e. module) called twitter.tcl to do the generic part, i.e. firing off HTTP GET requests with a query, and reporting results on screen as well as calling a user-specified call-back proc:
Here’s an example of the output, when left running for a little while – note that only messages containing the text “design” will be picked up:
This implementation is a bit simplistic. It will truncate each tweet and only send out the first 60 characters (to fit into a single RF12 packet).
But hey… this is proof-of-concept, after all!
Update – the arena wall is ready. Time to try it out!
Here’s a video of the TwitLEDs robot, driving around while staying out of trouble… as you can see, it really manages to do so – mostly ;)
That almost concludes this project. Tomorrow, the last installment will be posted, with final photos and videos.