Arduino based rss reader – W/Check Facebook Status Updates script.

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.


Here’s how I did it.

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 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 4×20 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

UPDATE 2 – Here is some new code to follow a twitter feed

29 replies on “Arduino based rss reader – W/Check Facebook Status Updates script.”

  1. 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!

  2. 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?

  3. Hey really cool! I would like to do a project like this for a status display in my office window. If I have my door closed, it is hard to see whether I am in my office or not, so I would like to do this and put in a small chassis and mount it in my window.

    My question is – is this totally powered by USB only, even with backlight on the LCD? My computer is pretty far away from my window, so I would like to only run a single 16 foot USB cord if I could.


  4. Hi, I am planning a project and wondered what you think about the possibility of getting the arduino to check an rss feed over wifi? Would like to disconnect it from a computer if possible!

  5. Gerry – it is 100% possible.
    You would need a wifi shield, but that is cheaper than a computer. One other option is to use a hacked router. There are a few out there that you can enable a serial port on.

    The simplest option would definitely be the wifi shield though. Let me know how it goes!

  6. Hey!
    is there any other link?

    its redirecting me to the page “”

    where it says “This is somewhat embarrassing, isn’t it?”

Comments are closed.