External RTC Module Integration (i.e. DS3231) #2
Unanswered
biswajitkgp
asked this question in
Q&A
Replies: 2 comments 5 replies
-
hey @biswajitkgp thanks for your feedback 👍 I'll add a callback setter for this and push changes soon, just found a few minor bugs I need to fix before 😉 |
Beta Was this translation helpful? Give feedback.
3 replies
-
just pushed some changes on 1.3.2 branch A custom WiFiManagerNS::NTP::onTimeAvailable( &your_custom_callback ); Just implement your RTC.adjust in Please let me know how this worked for you so I can prepare a new release. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi tobozo!
First of all congratulations for making such an awesome library! It is really helpful. Can you help me integrating a DS3231 with the ESP32?
Whenever the ESP32 syncs time with the NTP Server, it should also set the time of the DS3231 Module. You can like add the code for writing time to the DS3231 maybe in the following function in your NTP.cpp file
// Callback function (get's called when time adjusts via NTP)
void timeavailable(struct timeval *t)
{
Serial.println("Got time adjustment from NTP!");
struct tm timeInfo;
getLocalTime(&timeInfo, 1000);
Serial.println(&timeInfo, "%A, %B %d %Y %H:%M:%S zone %Z %z ");
}
Any help will be really appreciated. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions