Whenever [Gareth James] needs to catch a train he has only to push a button on this frame and the next three departure times will be displayed. As you can see from the post-processing in the photo, this is accomplished by a Raspberry Pi board using a few familiar tools.
Let’s take a look at the hardware first. He acquired a 7″ LCD display which he removed from its plastic case. The bare screen will easily fit inside of the rather deep wood frame and its composite video input makes it quite simple to interface with the RPi board. There was a little work to be done for power. The LCD needs 12V so he’s using a 12V wall wart to feed the frame, and including a USB car charger to power the RPi. The last thing he added is a button connected to the GPIO header to tell the system to fetch a new set of times.
A Python script monitors the button and uses Beautiful Soup to scrape the train info off of a website. To get the look he wanted [Gareth] wrote a GUI using tkinter. Don’t miss the demo after the jump.
If you need a bit of a primer on scraping web data take a look at this guide.
A Raspberry Pi for a simple call to a web service ? a bit of an overkill…
The casing is real nice, though.
Raspberry Pi seem to me to be a really good fit for some rendering and a little bit of web scraping. I don’t see how you could do that cheaper in a stand alone device (in new parts) without going to ridiculous lengths. Rpi + memory card is like $40-50 (shipped), hardly a problem for most westerners with a day job and no kids, well worth the convenience for many.
I forgot to add, it’s a very nice device. It would look really awesome with a eink-display.
He probably only knows python, so he used a raspberry pi. This is more of a good art design married with some nice work. I personally think it’s a hack due to the way he used the screen in the frame.
Tell me an *easier* way of getting data onto an LCD that is formatted nicely like that. Only then will your comment be respected. Don’t forget the cost of your solution has to be less than the rpi.
my bad: i should also have pointed out that using a high resolution lcd screen to display 3×4 digits was also overkill — it just seemed obvious.
So : arduino + whatever network wing + 12 7 segment display. I have not made the total, but I would think that we are *way* below the cost of the RPi + LCD.
But then you would have to adapt the design — I’m not sure that the retro 7 segments would fit in that (again, very nice) case.
Please do not take as not respectful (your answer was, btw) — I was just thinking that, although the result is nice, it seems a bit of a waste of good computing power.
Why is reducing development time “overkill”? Should everyone use machine language and TTL?
Yes
While I agree the rPi is the sensible option here, I would genuinely love to see someone build a webscraper and drive the LCD using TTL and machine language.
Very nicely done. You say in the post that you scrape the data from one of the live train times sites. Network Rail have recently released their data for free – though you do have to sign up for it, and it isn’t perhaps as easy to digest as a screen scrape – might be worth a look though:
https://datafeeds.networkrail.co.uk/
Thanks for the tip Ben, i’ll check it out. I did look for the API but didn’t find this page.
It’s a sweet project, though I agree that raspberry pi is probably overkill. Pulling the data through Yahoo Pipes or running his python script through something like scraperwiki would have made more sense.
This still leaves the question how you get your information to this kind of LCD panel. I don’t know how much time it would take me to build a system which converts plain text to e.g. a good looking VGA signal. Before there was the pi, I would probably thought about gutting an old laptop.
It’s a sweet project, but raspberry pi was overkill. It would have made more sense to pull the data through yahoo pipes or run the python script remotely on something like scraperwiki
Why does it have the pushbutton? Why not just update continuously?
It would be nice to be always-on, but I included the pushbutton to avoid checking the server too often (its a scrape script). Also I wanted to switch the screen off automatically when it’s not needed.
What screen are you using and how is it connected to the Raspberry Pi?
Hey Wouter – the screen is here: http://www.amazon.co.uk/gp/product/B007SLDF7O/ref=oh_details_o05_s00_i00 and it’s connected through the RCA connector, not HDMI. build info is here: http://digitalfantastico.blogspot.co.uk/2013/01/a-big-bite-of-raspberry-pi-having.html
Aren’t Brighton and Hove the same place?
It is now a city, but historically they were two separate towns, with combined transport of course. Only in the last 20 years (I don’t remember when) were the two councils merged after city status.
Why would you want to catch a train from Hove to Brighton.
Walk to the beach, swim ten feet and you are now in Brighton.
OK, you may be a bit wetter than the journey by train. But it’s quicker.
Brighton connects to other places (Lewes, Eastbourne, Hastings, and smaller stops on the route via Haywards Heath to London, plus Thameslink { https://en.wikipedia.org/wiki/Thameslink } route to Gatwick and Luton airports, and Bedford).
Hove is on the Brighton to Portsmouth / Littlehampton west coast (most is in West Sussex) line, and while there are trains from Hove direct to London (on the Littlehampton to London Victoria route), they are hourly (or where, when I lived in the area until 1989) during the day, so it can be quicker to go via Brighton.