From 355b5e26f86f6c6c6c4b176a550e3423ca01b4cb Mon Sep 17 00:00:00 2001 From: 0x1abin <270995079@qq.com> Date: Wed, 16 May 2018 14:41:54 +0800 Subject: [PATCH] updated README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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) +``` +