This commit is contained in:
xyj 2023-12-26 17:13:24 +08:00
parent e2e202da6b
commit 7fcc7d362a
1 changed files with 2 additions and 2 deletions

View File

@ -8,9 +8,9 @@ import time
import board import board
from digitalio import DigitalInOut, Direction from digitalio import DigitalInOut, Direction
# 构建LED对象和初始化 # 构建LED对象和初始化
while True:
led = DigitalInOut(board.CS1) # 定义引脚编号 led = DigitalInOut(board.CS1) # 定义引脚编号
led.direction = Direction.OUTPUT # IO为输出 led.direction = Direction.OUTPUT # IO为输出
while True:
print("熄灭") print("熄灭")
led.value = 0 # 输出低电平熄灭板载LED蓝灯 led.value = 0 # 输出低电平熄灭板载LED蓝灯
print("点亮") print("点亮")