Post topics, source code that relate to the Arduino Platform

User avatar
By µrt
#76261 I have seen pretty good and working NTP sample code. My point (which I didn't make it clear initially) is to use a RTC internally or in software and sync it using NTP every hour or another set duration to maintain accuracy.

I clearly understand that the ESP8266 internal clock is not a calibrated one. I also assume that it drifts quite a lot but; syncing with NTP every some duration would maintain a decent accuracy.

I believe that using an external hardware RTC and syncing it is a good solution but, is there a way to establish an internal RTC and refresh internal (or external) RTC with NTP periodically (maybe very 30 mins)?

Thanks,
User avatar
By µrt
#76484 Thanks all for suggestions.

I found an excellent resource that fits my bill. I was able to successfully use https://tttapa.github.io/ESP8266/Chap15%20-%20NTP.html to fit my needs.

This library / code seeks NTP server every minute (you can adjust the duration). I modified the code to display time on physical display and it was right on.

:D
User avatar
By µrt
#76485
schufti wrote:that is exactly what is implemented in the esp8266 arduino core from 2.4 upwards if you use internal sntp functions.
btw: there is no rtc in esp8266


Yes Sir, I understand that there is no hardware RTC in ESP8266 but was wondering if there were any soft RTC solutions.