本站改版新增arduino频道
from machine import Pin,Timer led=Pin(12,Pin.OUT) Counter = 0 Fun_Num = 0 def fun(tim): global Counter Counter = Counter + 1 print(Counter) led.value(Counter%2) #使用定时器0,周期为1秒 tim = Timer(0) tim.init(period=1000, mode=Timer.PERIODIC,callback=fun) #周期为1000ms
Copyright © 2014 ESP56.com All Rights Reserved
晋ICP备14006235号-22 晋公网安备14108102001165号
执行时间: 0.0096180438995361 seconds