circuitpython/tests/renesas-ra/rtc_init.py
Takeo Takahashi 4753913253 tests/renesas-ra: Add tests for renesas-ra port.
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-29 12:29:07 +09:00

13 lines
218 B
Python

import machine
from machine import RTC
import time
rtc = RTC()
rtc.init()
print(rtc)
# make sure that 1 second passes correctly
rtc.datetime((2014, 1, 1, 1, 0, 0, 0, 0))
time.sleep_ms(1002)
print(rtc.datetime()[:7])