from machine import Timer# timer 到时回调函数。def timer_callback(t): print('timeout occured !')# 创建定时器对象。t = Timer(Timer.Timer1)# 启动定时器,周期性 1s 执行定时器回调。t.start(period=1000, mode=t.PERIODIC, callback=timer_callback)