SBB departure board

The story

At my job at Öko-Job in Liestal I needed something that would tell me when a delivery person had dropped something off. I ordered a pile of parts and built a system with ESP boards that detects whether a door is open. It isn’t listed on this site because I accidentally lost the source code, for now at least.

After many, many nights working on these boards, and a lot of waiting for late trains in the blistering cold, I had an idea: why not have a little display that warns me when my train is late? I always forget to check, but I’d definitely notice a red block on a screen.

So I built the SBB board. It’s an ESP32 with a small colour screen that pulls live departures from the Swiss public transport OpenData API and shows the next four, sorted by time. A green box means the train is on time, a red one means it’s more than a minute late, with the delay in minutes. I can filter by destination and line, so it only shows what I actually take, and at night it dims itself.

3D model of the Waveshare ESP32-C6-LCD-1.47, made from Waveshare's CAD drawing. Drag to rotate.

It used to freeze now and then, so I added a watchdog that restarts it whenever it hangs. I also hardened the rest of the firmware. It only keeps the five fields it needs from each departure, so the answer from the API can’t overflow its memory, and if the WiFi, the request or the data fails, it shows the reason in red and restarts.