Example: 50-OpenMV-Boards/50-IMXRT-Boards/50-Board-Control/rtc.py

# 本作品采用MIT许可证授权。
# 版权所有 (c) 2013-2024 OpenMV LLC。保留所有权利。
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# RTC 示例
#
# 此示例展示了如何使用 RTC。

import time
from machine import RTC

rtc = RTC()

# 注释掉这部分以初始化RTC时间和日期。
# 执行此操作后,RTC将保持时间,直到
# 系统完全断电。
# rtc.init((2023, 8, 8, 14, 15, 0, 0, 0))

while True:
    time.sleep_ms(100)
    print(rtc.now())

results matching ""

    No results matching ""