This commit is contained in:
xyj 2023-12-26 17:15:04 +08:00
parent f3b2452d03
commit 2e33b491ac
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,8 @@ from digitalio import DigitalInOut, Direction
while True:
led = DigitalInOut(board.LED) # 定义引脚编号
led.direction = Direction.OUTPUT # IO为输出
print("熄灭")
led.value = 0 # 输出低电平熄灭板载LED蓝灯
print("点亮")
print("熄灭")
time.sleep(20)
led.value = 1 # 输出高电平点亮板载LED蓝灯
print("点亮")