NodeMCU (Arduino) - RTC init from NTP
This is an example sketch (quick and dirty) to show how I initialized a DS1307 RTC Module from a NTP server's response.
The PIO configuration is for a NodeMCU v1.0 board, which can be modified as required.
Changing Timezone
Change the following constant to your timezone offset from GMT in seconds:
const uint32_t timeZoneOffsetSeconds = 19800;
Log in or sign up for Devpost to join the conversation.