diff --git a/README.md b/README.md index 7ed5a47..2269d9a 100644 --- a/README.md +++ b/README.md @@ -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) +``` +