Friday, October 3, 2014

NTP synchronization

There is RTC circuit on the main board which is battery backed up. But it lacked the feature to set the correct time other then the compilation. As it has drifted a minute a month, or so, I guessed it is right time to make it synchronized with some NTP server.

I have put a button on the home page of the interface to get the correct time, as well as letting the service thread synchronize time when it starts.

It took me some hours to combine some examples on the net into working code, that I think is a bit optimized, and also working with the rest of threads and web-service. The changes are pushed to Git Hub.

On the Arduino forum is a good post about choosing the right NTP server, which is a valuable resource to read. Especially the attached link to Flawed Routers Flood University of Wisconsin Internet Time Server.





No comments:

Post a Comment