My last project, the arduino gmail checker really opened my eyes to python/rss/arduino integration. I branched out from there to use feedparser for more conventional rss reading and I ended up with a python script that pulls in your friend updates from facebook. That was cool watching it scroll by in terminal, but I decided to geek it up a bit and make it display out through a serial lcd. Nothing is more distracting than a lcd flickering constantly at your desk! Here's a pic of it doing it's thing.
1-Python The python code is quite similar to the code from my last project - the arduino gmail checker (thanks J4mie) This time I added a warning to tell you when it doesn't have the right serial port attached, I added the ability for it to scroll text or page text, and I (had to) add the ability for it to cut the string output into manageable bites. I'm quite certain that anyone versed in python would find this bit of hackery laughable. I am literally learning python as I wrote this, but it seems to get the job done. Like the previous example, this requires feedparser. Install it if you haven't. There are a few things to tweak in the script. It is well commented, and should be self explanatory. The most important is filling in your facebook feed. it should start something like http://www.facebook.com/feeds/friends_status.php?id=XXXXXXXXXXX. Figure it out from the FB. Here is the source code in a zip file.
2-Arduino For this bit I used a bit of code from Stephen Wilson, unaltered. It allows the arduino to receive a string, as opposed to looking like there was a println for every character. Upload this, make sure you have auto-reset disabled on your arduino, and move on to the hardware! If you try to upload to the arduino with the lcd attached, then you'll probably run into trouble. Just unplug the rx wire while uploading.
3-hardware Depending on what kind of serial lcd you are using, the hardware may vary. I am using a hd44780 controlled lcd with a lcd117 kit from modern device company. If you are using anything else, then you may need to change the clear screen and position commands to suit your lcd controller. I am using a 4x20 display. If you are using a different display then you may need to make the "LNLENGTH" correct in your python script. I have the lcd117 connected to power, ground, and rx (pin 0) I have the backlight connected through a 10k potentiometer to power and ground. I think the 10k is a bit overkill, but haven't changed it yet.
That ought to be it! Fire up terminal, upload to the arduino. Start up the python script and adjust the backlight for easy reading. There are a bunch of settings you can tweak in the python sketch for scrolling speed, page speed, if scroll is on or off, and screen size and positioning. Play with it. If I have my scroll speed set too fast, or if I have too many commands in a row, then I will reset the lcd controller, but that's an easy fix!
Those eagle-eyed readers out there might have noticed that this one doesn't run a .plist file. I got lazy, and I didn't want it to have any lag time between loops, so I just set up a big 'for' loop in the python file. It runs for a long time now, but it gets the job done.
the cool thing is that this could be expanded with any one of a huge number of feeds. you could have it read your stock quotes, weather report, or twitter status. I'll see which one I get motivated to code first! I would also like to note that there might be lots of other people out there who have done this. It isn't particularly mind-blowing, but the interesting thing is that arduino + rss is one of those ungoogleable things, because every rss feed in the world comes up. Happy hacking!
UPDATE - Here's a new python script I wrote to check the weather





9 responses so far ↓
1 HOW TO - display RSS feeds with Arduino » Developages - Development and Technology Blog // Dec 2, 2008 at 4:05 pm
[...] Very cool and useful! Read his detailed how-to to get up and running. - Arduino based rss reader [...]
2 HB // Dec 2, 2008 at 8:29 pm
I like the video showing how this works. Very clever!
3 Vitamin Features » 10 Web Geek Christmas Gift Ideas // Dec 3, 2008 at 10:49 am
[...] physical projects that interact with the Web. Some cool Arduino projects: A Twitter scroller, Arduino RSS reader, A Web-based air quality meter that uses an antique voltmeter for a [...]
4 HOW TO - display RSS feeds with Arduino | SquareCows // Dec 3, 2008 at 9:03 pm
[...] Very cool and useful! Read his detailed how-to to get up and running. - Arduino based rss reader [...]
5 Gmail and RSS Notifiers using the Arduino | Hack N Mod // Dec 3, 2008 at 9:27 pm
[...] port, you can create your own physical notifier which alerts you when you receive email or when an RSS news feed is updated. It can even update you of your friends’ facebook status.Related DIY [...]
6 Rss Parser for twitter | Build it up to break it down again // Dec 5, 2008 at 8:23 am
[...] Arduino based rss reader - W/Check Facebook Status Updates script.12.2 [...]
7 m44r.net -m33p » Blog Archive » Arduino & Sparkfun SerLCD & Facebook RSS feeds // Dec 7, 2008 at 12:55 am
[...] Just a few small changes to the Arduino Facebook RSS reader as supplied by tinyenourmous [...]
8 Vitamin - All content » Blog Archive » 10 Web Geek Christmas Gift Ideas // Dec 9, 2008 at 4:37 am
[...] physical projects that interact with the Web. Some cool Arduino projects: A Twitter scroller, Arduino RSS reader, A Web-based air quality meter that uses an antique voltmeter for a [...]
9 10 Web Geek Christmas Gift Ideas | Castup // Dec 29, 2008 at 6:02 am
[...] physical projects that interact with the Web. Some cool Arduino projects: A Twitter scroller, Arduino RSS reader, A Web-based air quality meter that uses an antique voltmeter for a [...]
Leave a Comment