RTC class - available methods
Posted: Sun Dec 18, 2016 9:47 am
According to http://docs.micropython.org/en/latest/e ... e.RTC.html, there is a Class RTC available in MicroPython. It seems this Class is in the Module machine. When I follow the example code from the link above (extented by import machine), it doesn't know the init() nor the now() method.
Results into: AttributeError: 'RTC' object has no attribute 'init'
I am using a bare ESP8266, with "MicroPython v1.8.6-7-gefd0927 on 2016-11-10; ESP module with ESP8266"
Code: Select all
import machine
rtc = machine.RTC()
rtc.init((2014, 5, 1, 4, 13, 0, 0, 0))
print(rtc.now())
I am using a bare ESP8266, with "MicroPython v1.8.6-7-gefd0927 on 2016-11-10; ESP module with ESP8266"