Example: 50-OpenMV-Boards/50-STM32-Boards/80-Low-Power/stop_mode.py

# 本作品采用MIT许可证授权。
# 版权所有 (c) 2013-2023 OpenMV LLC。保留所有权利。
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# 停止模式示例
# 此示例演示了使用低功耗停止模式。

import pyb
import machine

# 创建并初始化 RTC 对象。
rtc = pyb.RTC()
# (年,月,日[,小时[,分钟[,秒[,微秒[,时区信息]]]]])
rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0))

# 打印 RTC 信息。
print(rtc.datetime())

# 每5秒启用RTC中断。
rtc.wakeup(5000)

# 进入停止模式。
# 请注意,IDE将断开连接。
machine.sleep()

results matching ""

    No results matching ""