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.