openmv/scripts/examples/50-Arduino-Boards/Portenta-H7/50-Board-Control/rtc.py
iabdalkader 98a29e0870 scripts/examples: Update examples.
- Add examples index.
- Remove RP2040's Bluetooth examples.
- Resort examples.
2023-10-29 21:21:55 +01:00

17 lines
370 B
Python

# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# 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)