# 引入模块
from machine import Pin
from time import sleep
# 创建led对象
led1 = Pin(13, Pin.OUT)
led2 = Pin(15, Pin.OUT)
# 第一步 led 点亮
led1.on()
# 第二步 led 闪烁,设置闪烁时间间隔为0.5秒
while True:
led2.on()
sleep(0.5)
led2.off()
sleep(0.5)
# 引入模块
from machine import Pin
from time import sleep
# 创建led对象
led1 = Pin(13, Pin.OUT)
led2 = Pin(15, Pin.OUT)
# 第一步 led 点亮
led1.on()
# 第二步 led 闪烁,设置闪烁时间间隔为0.5秒
while True:
led2.on()
sleep(0.5)
led2.off()
sleep(0.5)