mirror of
https://github.com/m5stack/M5Cloud.git
synced 2026-05-20 10:07:21 -07:00
updated README
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
- [UART](#uart)
|
||||
- [Timer](#timer)
|
||||
- [Neopixel](#neopixel)
|
||||
- [RTC](#rtc)
|
||||
- [LoBo MicroPython WiKi](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki)
|
||||
- [Examples](examples)
|
||||
|
||||
@@ -627,6 +628,23 @@ def blinkRainbow(loops=10, delay=250):
|
||||
time.sleep_ms(delay)
|
||||
```
|
||||
|
||||
## **RTC**
|
||||
|
||||
---
|
||||
```python
|
||||
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)
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user