-
Notifications
You must be signed in to change notification settings - Fork 220
Setting the time on an esp32 #87
Comments
Not to my knowledge, so feel free to go for it. |
Some work on machine.RTC here: #85 |
Thanks mcauser! I'll just add the localtime method to utime to complete setting the time. |
Cool, I should add a call to |
Actually, I did implement
Edit 2: Also, implemented using subseconds (255-0) instead of µseconds ... probably not the right thing to do for machine.RTC (as opposed to pyb.RTC) Edit 3: Implemented RTC().init(()), and replaced subseconds with microseconds |
Has anybody wired in the SNTP code form the SDK? Seems like it'd be a nice fit. |
Thanks @MrSurly, that's what I needed to set the time from ntp. |
I've worked with the ESP8266, and there I would set the time on bootup via ntp. I was able to call the RTC class from machine and also, use utime.localtime to help calculate the delta. Then I would call RTC().datetime to set the time accordingly. In the ESP32 port, there is neither an RTC class or a localtime function from utime, I'd be glad to look at adding it, but I wanted to make sure I'm not duplicating the same functionality elsewhere. Is someone already working on something similar?
The text was updated successfully, but these errors were encountered: