- Create version of this using static data from published NCL metro timetables https://www.nexus.org.uk/metro/timetables-stations first using Fawdon as the starting station. Can use same Dotmatrix font as original project, but the layout and messages are different
- Investigate whether there is an API available from Nexus - otherwise find another way for getting real-time data
- Config for each station - focus on Fawdon, Central Station, Monument, St. James and Haymarket
Python script to display replica real-time UK railway station departure screens for SSD13xx devices
To run this code, you will need Python 3.6+.
If you're using Raspbian Lite, you'll also need to install:
libopenjp2-7
with:
$ sudo apt-get install libopenjp2-7
-
Clone this repo
-
Install dependencies
$ pip install -r requirements.txt
-
Sign up for the Transport API, and generate an app ID and API key
-
Copy
config.sample.json
toconfig.json
and complete the values, including your Transport API keys from step 3. Note: station names should be provided as their three-letter station code, all available here. -
Start the app with:
$ python ./src/main.py --display pygame --width 256 --height 64
Change the --display
flag to alter the output mechanism (a list of options can be found in this README: https://github.com/rm-hull/luma.examples). Use capture
to save to images, and pygame
to run a visual emulator.
Remember to pass --interface spi
if you are using SPI to communicate with your screen. Otherwise, the default of i2c
should suffice.
$ python ./src/main.py --display ssd1322 --width 256 --height 64 --interface spi
I've tweeted a video demo of the software running on a real device: https://twitter.com/chrishutchinson/status/1136743837244768257
Chris Hutchinson originally built this code https://github.com/chrishutchinson/ which I am (attempting) to adapt for the Tyne & Wear Metro
The fonts used were painstakingly put together by DanielHartUK
and can be found on GitHub at https://github.com/DanielHartUK/Dot-Matrix-Typeface - A huge thanks for making that resource available!