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.
[youtube]http://www.youtube.com/watch?v=ypshRUC20sw[/youtube]
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




20 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 [...]
10 Donald // Jan 22, 2009 at 6:44 am
Hi you can have a look to http://contest.libelium.com maybe you can win some stuff for your arduino proyects.
11 RobotGrrl // Jan 24, 2009 at 3:05 pm
Pretty cool stuff-
What is supposed to happen when you don’t take the auto-reset off?
I’m using a diecemila- and I don’t really want to wreck the board. I have the python script running, my Arduino (with that code above) is connected to my macbook, and my LCD is connected with a 117 from moderndevice to the Arduino.
It’s not working. >_<
I can see the updates in Terminal, but not on the LCD.
Can you confirm that this is due to auto reset?
Keep up the good blogging!
12 RobotGrrl.com » Blog Archive » Friday Night Robotics - Light // Jan 25, 2009 at 9:58 pm
[...] it says on the LCD that I’m at “cheel”, it is hardcoded in. I tried to use the script that downloads a feed, but it doesn’t work for me, for some reason. I commented below that post with my setup and [...]
13 TinyEnormous // Jan 29, 2009 at 1:47 pm
Hey RobotGrrl!
If you don’t take the auto reset off, then the arduino will only run connected to the mac _While_ the arduino app is open (as I recall). There wasn’t any way to upload the sketch and then close the arduino app.
The reason for that is that with auto reset on it resets the rx line when receiving data. This sketch uses the Rx line to send the lcd data to the arduino.
If you are worried about removing the auto reset “feature” from your diecemilla then your could always grab a bare bones board (or other DIY arduino) and simply not put the diode in.
I had all kinds of weird trouble with the lcd before I did the reset hack. One other thing to think about is that you can only output so much data to the lcd117 at a time. If you give it too much it will spit out weird errors, or reset itself.
Good Luck!
btw how is cheel this time of the year?
14 TinyEnormous // Jan 29, 2009 at 1:50 pm
thanks! I’ll check it out.
15 Ardunio feed twitter facebook reader | Robots.ie // Feb 23, 2009 at 9:02 am
[...] Read all the details and get the code on the tinyenormous blog . Here [...]
16 Tweetlite: A twitter visualization cube | bruzed.com // Apr 15, 2009 at 9:05 pm
[...] The code is based off of example found here. [...]
17 bruce // Apr 15, 2009 at 9:10 pm
Thanks for publishing this!! I used your code to power my Tweetlite. Check it out: http://bruzed.com/2009/03/17/tweetlite-twitter-visualization-cube/
18 remoSolf // May 17, 2009 at 3:17 pm
eh.. love it :)
19 Gregg Benjamin // Dec 5, 2009 at 1:46 pm
what pins did u use for your potentiometer
20 TinyEnormous // Dec 7, 2009 at 9:05 pm
Hi Gregg. No Arduino pins for the potentiometer – they connect to the lcd, power, and ground. It is used to set the contrast for the lcd.
Leave a Comment