m5stack / M5Stack_MicroPython

MicroPython for ESP32 with psRAM support
Other
230 stars 53 forks source link

No idea how to troubleshoot this system #19

Open cdeadlock opened 4 years ago

cdeadlock commented 4 years ago

The main documentation for this project shows examples such as the RTC section ` import machine import utime

rtc = machine.RTC() rtc.ntp_sync(server="hr.pool.ntp.org", tz="CET-1CEST") rtc.synced() True utime.gmtime() (2018, 1, 29, 16, 3, 18, 2, 29) utime.localtime() (2018, 1, 29, 17, 3, 30, 2, 29) `

The Atom lite V1.6.3 says Traceback (most recent call last): File "flow/m5cloud.py", line 82, in _exec_fun File "<string>", line 13, in <module> AttributeError: 'RTC' object has no attribute 'ntp_sync' This project says it is made from and directly references the "micropython lobos" (https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/rtc) This also mentions ntp_sync

Then searching for micropython ntp , or the ntptime module is a huge mess of not working for years and never being documented or fixed apparently?

ntptime can be imported, but then has no settime() apparently

Is there some kind of custom compilation required to get these modules? Do they not come standard in the m5 supplied uiflow IDE firmware? I feel like that isn't right since they do "import" but just do not contain functions?

imliubo commented 4 years ago

Hi @cdeadlock , Since loboris-micropython is no longer maintained, we have switched to the main line of micropython, so you should refer to the documentation of the main line of micropython.

machine.RTC