Thanks to Internet, the problem of time shifting in embedded and connected devices was solved using time synchronization over Internet.
National Institute of Standards and Technology provides a service called Network Time Service (NTS) over the Internet. The project of ESP8266-based clock, published on embedded-lab, is going to demonstrate how to make a benefit from NTS to accomplish time synchronization over the Internet.
This clock retrieves time information from NTS and display it on a 4-digit seven segment LED display, and the connection to NIST time server through your local WiFi network will be by using ESP-01 WiFi module.
The 4-digit seven segment LED display breakout includes MAX7219 IC which is a seven segment driver. Three GPIO pins from ESP8266 module are used, where MAX7219 needs one for serial input,one for clock line and one to drive LOAD pin of MAX7219.
The firmware was developed using Arduino core for ESP8266. The firmware queries the time from NTS with 2-minutes interval that because NIST does not allow queries to any of their servers more frequently than once every 4 seconds, according to the blog post. During the 2-minutes, time display is kept running locally using the delay() routine.
Join 97,426 other subscribers