Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By moeur
#19191 Combining an ESP8266 module with a cheap 4-digit LED display can result in a WiFi connected clock that will always show the correct time.

I've written a library to control the 4-digit LED displays that are based on the TM1637 LED display driver chip. Unlike the MAX7219, the TM1637 can be run from 3.3V. Do a search on ebay or aliexpress for "TM1637 Display" and you'll find dozens of offerings for the module for prices under $1.50US. The LED display needs to connect to two pins of the ESP8266 for communication. These pin are set inside the code.

In addition to the Display library, I've converted the Time_NTP.pde example bundled with the Time library to a library for the ESP8266.

Now we have the makings for a WiFi clock, which is the example I've included with the NTP library.

Pick them up at GitHub.
Be sure to install the Time library mentioned above.
User avatar
By MarkKriegsman
#19227 Very nice! I really like the NTP client -- much nicer than what I was doing before (http request to timeapi.org and parsing the results).

Thank you for writing it, and for sharing it!
-Mark
User avatar
By ian
#19375 Great!
I had one of these displays in my 'box of bits' & was forced to try it out!
Well done! :)
I'm looking to use the ESP8266 with a class of students next year & this is a great example for them to study.


Cheers

Ian
User avatar
By Chris Carter
#22815 I looked at your github link, it has the NTP and tm1637 libaries, but no example? Am I missing something for this? I'm trying to make a network clock myself so this would be really awesome to help out thanks!