Close

The Promised Software Post

A project log for Traffic Signal LED Matrix Display

A networked LED matrix display made from a surplus LED traffic signal

clara-hobbsClara Hobbs 08/21/2016 at 15:530 Comments

I've uploaded the software, for both the ESP8266 and server, to GitHub. You can download it here. As of now, I have a basic display driving module that is used to show static images loaded from PNGs or PBMs. PBM loading is handled directly from the TrafficDisplay class, while PNG loading is done by my new micropython-png module. You can set the speed at which the display refreshes in milliseconds. I find that 2 ms per row is a decent speed: while it is noticeably flashy, it's not too obnoxious, and it doesn't look terrible when a network connection is active. 1 ms looks much better (as long as the processor is clocked at 160 MHz, which it automatically switches to if you set the display to run at 1 ms per row), but rows have inconsistent brightness when a network connection is active. I suspect the dual-core ESP32 would solve the problem entirely: I could run the matrix driving code on one core, and everything else on the other.

In the software repository you can also find a weather display application, with both a server and microcontroller component. The server component fetches current weather information from forecast.io and strips out everything the ESP doesn't need. A single call to forecast.io's API gives around 25 KiB of JSON, which the ESP would have a hard time processing all at once. By extracting only what we care about for the application, the ESP8266 has a much easier job. All it has to do is fetch the trimmed weather information, load the right PNG from its filesystem, and display it on the LED matrix. In the future, I'd like to make the icons animated, which would probably make it easier to tell what they're trying to depict. I'd also like to be able to show more interesting weather information, such as temperature and humidity, and maybe a forecast for the next couple days. I'll keep working on it, so stay tuned!

Discussions