NextBus is a free internet service using GPS and cellular networks to provide realtime arrival data for over 135 transit agencies in the United States and Canada.

For transit-bound people, the NextBus service is a tremendous convenience. Knowing when a bus is due means less standing out in the rain…one can use that time inside to get a little extra work done, or finish that cup of coffee. In this tutorial we'll build a handy desk-top or wall-mount countdown display that lets you know when the next bus or train is on the way!

This guide is a follow-up to our NextBus transit clock for Raspberry Pi project, using simpler and more affordable hardware (an ESP8266 WiFi microcontroller).

While the scrolling display of the prior project is very adaptible and would look impressive in a shared space like an office or hackerspace…it was too “Las Vegas” for something in my home. I really desired something more subdued and totally customized to my own use case.

NextBus provides web and mobile phone access, and there are some nice smartphone apps around. As a “heavy user,” I wanted to take it one step further, creating a wall clock of sorts…a continuous feed of the stops relevant to my needs…no need to even pull out a phone or click a bookmark, the information’s always there at a glance. An ambient information display.

This version of the clock uses these 0.56" 4-digit LED displays, one per bus line and stop of interest. My clock happens to include four (two bus lines, two directions)…you can have up to eight, but for many people a single display will suffice — the bus that’s heading to work or school!

The point of this project is to create a bespoke transit clock tailored to your needs, aesthetic tastes and available tools and skills. Sure, I’ll show you what went into mine…but I’ve got decades of accumulated tools here and you’d spend ridiculous sums trying to emulate it exactly. Don’t do that. Design the clock that best serves YOU.

Parts from Adafruit:

  • Feather HUZZAH ESP8266 WiFi microcontroller.
  • 0.56" 4-digit 7-Segment Display w/I2C Backpack — one per bus line & stop — any color will do, they all work the same! Or mix and match, to color-code each bus line. Personally I liked the look of the white ones, but these (and the blue ones) are a couple bucks extra. There are also 1.2" backpack/displays in a few colors, if you need extra large type. In either case, make sure to get the 7-segment displays with I2C backpack, not just the “raw” display!
  • Perma-Proto PCB. For a clock with just one or two displays, you might not need this!
  • Power source. You have MANY options here. It’s usually easiest to power the ESP8266 via the USB port…since I’ve got lots of spare USB cables and phone chargers, I upcycled one of those, but otherwise consider:

(If using one of the power-only USB cables/supplies mentioned above, you will also need a “normal” (power+data) USB A-to-MicroB cable for uploading code to the microcontroller.)

Other Items You’ll Need

At the very least, you’ll need the usual electronic project bits like wire and soldering paraphernalia.

For the initial code setup, you’ll need a computer that can run Python scripts from the command line…some systems (Linux especially) may already do this “out of the box,” but for others you may need to set this up on your own. That’s beyond the scope of this guide and you’ll need to acquire Python (it’s free) and read up on the basics elsewhere.

Beyond that, it’s all up to you how you’d like to present this. I went a bit overboard with 3D printing, laser cutting and even some toner-transfer trickery. Design your own case, or even just prop the bare LED display up on a shelf, it’s all good!

This guide was first published on Apr 03, 2016. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 30, 2016.

Text editor powered by tinymce.