Setting RTC From Internet?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Posts: 36
Joined: Wed Aug 03, 2016 11:39 am
Location: Florence, Italy

Re: Setting RTC From Internet?

Post by Lornioiz » Thu Nov 24, 2016 10:14 am

weldeng wrote:
Lornioiz wrote: Can I ask you how do you do the hourly polling? Do you have a variable holding the elapsed time or do you use a less resource intensive method (if it exist at all).
In Python (i.e. with hardware unlimited resources) I would use that approach, but I'm curious to know if there is a better solution.
Here is how I am doing it. Note the indents are not showing when I cut and paste:

Thank you, this is basically what I usually do (I use the utime.time method but the concept is the same).

Posts: 16
Joined: Thu May 28, 2015 6:52 pm

Re: Setting RTC From Internet?

Post by Saran » Thu May 31, 2018 3:29 pm

MicroPython v1.9.4 on 2018-05-11; WiPy with CC3200

Code: Select all

>>> import ntptime
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: module not found
Where can I get ntptime module?

User avatar
Posts: 2889
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: Setting RTC From Internet?

Post by pythoncoder » Thu May 31, 2018 4:17 pm

The ESP8266 version is here. This will doubtless require some adaptation for the WiPy.
Peter Hinch

Post Reply