A real-time LED transit arrival board for Clevelanders
This project is a modded Cleveland version of the dc-metro transit board. It uses the same hardware and general display, with capability to poll the Greater Cleveland Regional Transit Authority live trip updates and ⌚.
🚨🚨🚨 At some point in 2024, the legacy RTA service this board uses has a broken frontend. This unfortunately means you can't set this project up any more.
It uses a friendly version of Micropython (which is Python meant for embedded devices) called CircuitPython. CP is developed by the makers of the hardware, Adafruit, who makes and sells educational and hobby electronics/coding products, provides great resources and is woman-owned in NYC. Check em out.
- An Adafruit Matrix Portal - $24.99
- This is a single board microcontroller, a.k.a. a small computer
- A 64x32 RGB LED matrix compatible with the Matrix Portal - $39.99 to $84.99
- 64x32 RGB LED Matrix - 3mm pitch Smallest, finer grid
- 64x32 RGB LED Matrix - 4mm pitch
- 64x32 RGB LED Matrix - 5mm pitch
- 64x32 RGB LED Matrix - 6mm pitch Less dense pixels, but bigger (15" x 7.5")
- A USB-C power supply (15w phone adapters should work fine for this code, but the panels can theoretically pull 20w if every pixel is on white)
- A USB-C cable that can connect your computer/power supply to the board
- Prep the MatrixPortal and LED board using Adafruit's guide.
- Install CircuitPython. Click "Download .UF2 Now" and follow steps.
- Drag (copy) the
src/lib
folder from this repository onto CIRCUITPY drive. - Drag (copy) all the individual Python files inside
/src
onto CIRCUITPY drive. Do not copy the folder itself.
At this point your CIRCUITPY drive should look like:
I:\
│ api.py
| code.py
│ config.py
│ secrets.py
│ time_set.py
│ train_board.py
│
└───\lib folder, including all files in it
- To connect to internet, you need to open secrets.py and add your wifi ssid and password to respective
secrets
dict keys that say"enter_your_info"
. - Register for an adafruitio account and get a username and API key. The board needs to regularly synchronize its onboard clock using a free time service through adafruit io. It's free and intended to support hobby projects.
- Add your aio username and API key to the
secrets
dict in secrets.py.
The board should reload and start showing you default routes! You now need to configure it to your liking.
- Each route/stop/direction combination requires a Python dict with these 3 key:values. The 3rd key, params, is a nested dictionary object with 6 key-values.
- route_name: str, what will display, like "26" or "HL"
- route_color: int, hex color for bar (e.g. 0xff0000 for red)
- params: dict, the GCRTA Next Connect API request parameters, explained below
- 'routeID': ⚠ Get from NextConnect
- 'directionID': ⚠ Get from NextConnect
- 'stopID': ⚠ Get from NextConnect
- 'cutoff': int Trips arriving sooner than this time will be tossed out because they are impossible to reach the stop in time
- 'tpID': 0,
- 'useArrivalTimes': 'false'
The board can only fit 3 rows on it. If you are fetching more than 3 routes, it will display the 3 soonest arrivals in order of their arrival
- Go to GCRTA NextConnect Live Departure Times. This is an endpoint that delivers live departure updates from RTA's TransitMaster system, which is the central brain of RTA's operations, scheduling, and serving the RTA real time feed. This board essentially simulates using this website. 🚨 This doesn't work any more. Sorry people, I'm looking for alternatives 🚨
- For each route/direction/stop combo, you need to:
- Enter the desired route, direction, and stop on NextConnect.
- Open devtools for your browser (Ctrl + Shift + I) --Chrome is recommended if you aren't familiar with this
- Go to "Network" tab
- Wait up to 15 seconds for the browser to fetch the update again (it automatically does this)
- You should see a network action appear called getStopTimes. Click on it
- Click on Payload
- Use the parameters from that payload to fill out the
params
dict in the desired route dict.
- Upon saving your
config.py
with your desired routes, the board will reboot and populate with your configured route/direction/stops. 🎉🎉🎉