Xinyuan-LilyGO / T-Display-S3

MIT License
813 stars 201 forks source link

periodically resynchronise the internal Real time clock #253

Closed paulharbison closed 5 months ago

paulharbison commented 5 months ago

Arduino/esp32/v:2

Is there a way or function to periodically resynchronise the internal Real time clock.

My sketch I copied ( Rui Santos) only gets the time from Wi-Fi once and switches off the internet (as it’s not needed any more).

Well it is needed! It gets out of sync by as much as 1 or 2 minutes per month.

Which is worse than cheap digital watch. The precise time from Network Time Protocol (NTP) is wasted here.

Maybe resynchronise the RTC once per hour would be sufficient.

Any method or relatively simple solution would be much appreciated.

teastainGit commented 5 months ago

Hi, just a User passing by! I set up a GitHub repository for problems setting up and some examples here: https://github.com/teastainGit/LilyGO-T-display-S3-setup-and-examples

Check out my recent home-grown NTP time sketch for Arduino IDE . The ESP32S3 has a terrible RTC, ADC and DAC, just marginally useful, but free!

I am considering adding the built-in RTC to keep time and only goto NTP once an hour, to keep internet traffic down, a small part I know…

(I am modifying it now as we speak so check it out and come back later for any updates.)

-Terry If you want to go offline of GitHub, here is my email: @.***

Cheers ! Terry Stainton

@.***

On May 27, 2024, at 5:33 AM, paulharbison @.***> wrote:

Arduino/esp32/v:2

Is there a way or function to periodically resynchronise the internal Real time clock.

My sketch I copied ( Rui Santos) only gets the time from Wi-Fi once and switches off the internet (as it’s not needed any more).

Well it is needed! It gets out of sync by as much as 1 or 2 minutes per month.

Which is worse than cheap digital watch. The precise time from Network Time Protocol (NTP) is wasted here.

Maybe resynchronise the RTC once per hour would be sufficient.

Any method or relatively simple solution would be much appreciated.

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3/issues/253, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCNKOBBWMZF6I7F4DZEZ3DZEL4WXAVCNFSM6AAAAABIK2YSVOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTQNZQGQYTGMQ. You are receiving this because you are subscribed to this thread.

paulharbison commented 5 months ago

Thanks for your reply iwill look into it,