Skip to content

A live train departure board using the Pimoroni Badger 2040 W

License

Notifications You must be signed in to change notification settings

BenjaminEHowe/live-train-board

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Live Train Board

A live train departure board using the Pimoroni Badger 2040 W.

Live departure board data provided by the Rail Delivery Group.

Getting Started

  1. Install the latest Badger 2040 firmware on your device (select the regular build, not with-badger-os).
  2. Copy the files in the mpy directory to your device.
  3. Set CRS_LOCATION, WIFI_COUNTRY, WIFI_NETWORK, and WIFI_PASSWORD (and optionally CRS_FILTER) within config.json. If you're not sure what the CRS code is for your local station, you can find it on the National Rail website.

Configuration

There are several configurable values set in config.json:

Mandatory configuration

Your board will not work without these configueation items:

  • CRS_LOCATION: the CRS code for the station to show departures from.
  • WIFI_COUNTRY: the ISO 3166-2 country where the board is operating.
  • WIFI_NETWORK: the network name (SSID) that the board should connect to.
  • WIFI_PASSWORD: the password (PSK) for the network that the board should connect to.

Optional configuration

All of these items are optional, and have sensible defaults:

  • API_URL_PREFIX: the prefix used for the API URL. The default value, https://www.beh.uk/api/raildata, is implemented using Cloudflare Functions as part of my personal website.
  • CRS_FILTER: filter departures to only include trains calling at the given station.
  • DISPLAY_UPDATE_INTERVAL_SECS: how often to update the display, in seconds. The default value is 60 (seconds), but this could be increased for stations with infrequent departures.
  • EINK_REFRESH_INTERVAL: how often to perform a "full" refresh of the e ink display, to remove ghosting. The default value is to 60 -- i.e. a full refresh every 60th update. Set to 0 to disable.
  • EINK_UPDATE_SPEED: how quickly to update the display -- see the Badger 2040 docs for details. The default value is 2 (i.e. UPDATE_FAST).
  • NTP_HOST: the hostname of the server to use for NTP, when setting the time on boot. The default value is time.cloudflare.com, which is Cloudflare's secure time service.
  • NTP_INTERVAL_HOURS: how often to update the time using NTP, in hours. The default value is 4 (hours), but this may need to be reduced due to issues with clock drift. Set to 0 to disable.
  • SLEEP_MODE: when to enter "sleep mode", where the display does not update. The default value is 6pm to 8am (i.e. 1800-0800). Set to an empty string to disable.

About

A live train departure board using the Pimoroni Badger 2040 W

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published