With my wife being a confirmed news junkie the Dec MagPi Scrolling RSS feed project by Andrew Wilson’s gave me the inspiration for the perfect Raspberry Pi based gift for Christmas 2013.
I decided to go for the ‘raw’ open look simply mounting a LCD display on top of a Rainbow PIBOW case, this was driven in part by an inability to find a suitable box with a pre-cut opening for a 2 line 16 character display, but also I thought is looked good. The starting point for the software was obviously the article in the December MagPi, however in testing I found that periodically the display would corrupt. Looking at the imported ‘AndyPi_LCD’ code my feeling was that this was being caused when the ‘thread’ timed out mid way through sending a 2 byte command to the display. To get around this I created a modified version of ‘lcd. scroll_clock’ which returned after a number of loops to allow the RSS feed to be updated. I also tinkered with one or two other bits to improve the look and added to scan of a spare GPIO line so it was easy to initiate a controlled shut down.
Rather than stick with the single top-level RSS feed as described in the article I capture 4 of the 2nd level BBC RSS news feeds that fit with my wife’s interests. As set-up it checks for updates about every 5 minutes. To make things a little more bullet proof I use the python ‘try’ statement in initiate updates allowing any RSS fetch failures to be managed and recovered from.
At power up the application auto-runs initially displaying the IP address of the RPi for few seconds (just in case I ‘lose’ it on the home network), it then starts the scrolling the RSS feeds and displaying the clock. The net result is simple but effective and provides a great talking point.
For anyone interested , if you want a copy of the Python code drop me an email – the code is not beautiful but it works.