Setting RTC From NTP


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3319
Posted: 02:49am 03 Jan 2024      

Setting RTC From GPS
A little off topic but may be useful if a GPS module is configured.
> If gps(valid) then rtc settime gps(date)+" "+gps(time)
> ? time$, gps(time)
13:43:19        13:43:19
>


Edit
For better synchronization.
If gps(valid) then
 t$=gps(time)
 do while t$=gps(time)
 loop
 rtc settime gps(date)+" "+gps(time)
endif

Edited 2024-01-03 13:26 by phil99