This is an example of how to use the ESP32's Wireless capabilities to use UDP to contact the National Time Protocol Server (NTP), with a minor modification to set the DS3231 Real Time Clock.
The time is offset from GMT, and my offset is -7 (PDT).
The code is broken down into WiFi Setup, NTP lookup to timeClient, and then value adjustment and then push to the Real Time Clock (DS3231).
Using the DS3231, and the 74595 (my example), are part of a larger project that I hope to put in place in a few weeks, to control my custom 14 zone sprinkler system, and replace two sprinkler boxes, currently in use.
Comments