UIFlow Guide
设置Watch Dog Timer, 当程序出现异常没有按照预期时间进行feed操作时, 将复位设备。
from m5stack import *
from m5ui import *
from uiflow import *
from machine import WDT
import time
setScreenColor(0x222222)
wdt = WDT(timeout=2000)
while True:
wait(3000)
wdt.feed()
wait_ms(2)
wdt = WDT(timeout=2000)
wdt.feed()