TM1637 Wi-Fi clock

This is an ESP8266-based Wi-Fi clock with automatic daylight saving time (DST). Once you set it up, you don't have to manually adjust the time between standard and summer time. Yes, this can be done, and it takes just one line of code!

Clocks are probably the most common Arduino projects out there, and the internet is full of them. Unfortunately, many of these projects aren't great—I'm sorry, but it's true. I’ve built a few basic clocks using the usual DS3231 RTC module and an Arduino Nano, but dealing with daylight saving time was always a pain! I really dislike turning clocks back and forth. The obvious solution is a Wi-Fi clock, and that’s very easy to make with the ESP8266 (or ESP32). The best part? You don’t need any hacks or workarounds—ESP8266 has DST built in! In fact, I don’t bother with ATmega-based clocks anymore.

I like old digital clocks and clock radios, so the TM1637 display feels like it was made for me. It’s available in many colors and at least two different sizes, and it’s inexpensive! I got mine from AliExpress for around €1 per piece, so I picked up about ten of them in various colors and sizes. The smaller display fits perfectly in the Hammond 1593 enclosure, one of my favorite project boxes.

One practical challenge you might face is finding transparent plastic for the display face. I use transparent colored acrylic. However, it tends to produce reflections, so I sand it down using 2000-grit wet sandpaper or a red Scotch-Brite pad. I recommend red acrylic for red displays and black acrylic for other colors.

As for the code—it’s nothing special. It’s as simple and basic as it gets. The libraries do all the heavy lifting, but I can still call it my code. One small personal touch: I don’t like blinking colons in the center of the display. Especially at night, it’s super annoying! Of course, you can easily modify the code for different displays or features if you prefer. The clock will initially display 0000 until it connects to Wi-Fi, and it will show "dOnE" for five seconds once the connection is established. After that, it will display... the time.

Click the button below to download the code files for this project. These files are provided as-is, with no guarantees regarding functionality or compatibility. Please review the code and feel free to use it as a reference for your own projects.

ESP8266 & TM1637 wifi clock ESP8266 & TM1637 wifi clock

← Back