esp8266开发(1)led闪烁

启动IDE(uPyCraft)

代码如下

from machine import Pin
from time import sleep
led = Pin(2,Pin.OUT)

while 1:
  led.on()
  sleep(0.5)
  led.off()
  sleep(0.5)

esp8266开发(1)led闪烁_第1张图片

你可能感兴趣的:(esp8266)