本站改版新增arduino频道
import _thread,time from machine import Pin led1 = Pin(12,Pin.OUT,value = 0) led2 = Pin(13,Pin.OUT,value = 0) def test1(): global led1 for i in range(100): led1.value(not led1.value()) time.sleep_ms(1500) def test2(): global led2 for i in range(100): led2.value(not led2.value()) time.sleep_ms(1000) _thread.start_new_thread(test1,()) _thread.start_new_thread(test2,())
Copyright © 2014 ESP56.com All Rights Reserved
晋ICP备14006235号-22 晋公网安备14108102001165号
执行时间: 0.012509822845459 seconds