openmv/scripts/examples/OpenMV/02-Board-Control/rtc.py
iabdalkader 20587f308e Merge time and utime modules.
* Move clock class to utime module.
* Update all examples to be compatible with utime.
2020-11-27 15:44:39 +02:00

13 lines
209 B
Python

# RTC Example
#
# This example shows how to use the RTC.
import time
from pyb import RTC
rtc = RTC()
rtc.datetime((2013, 7, 9, 2, 0, 0, 0, 0))
while (True):
print(rtc.datetime())
time.sleep_ms(1000)