From 7fcc7d362acd86229591d595632139b246171653 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Tue, 26 Dec 2023 17:13:24 +0800 Subject: [PATCH] update --- test_led.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_led.py b/test_led.py index d7d7c7d..6225191 100644 --- a/test_led.py +++ b/test_led.py @@ -8,9 +8,9 @@ import time import board from digitalio import DigitalInOut, Direction # 构建LED对象和初始化 -led = DigitalInOut(board.CS1) # 定义引脚编号 -led.direction = Direction.OUTPUT # IO为输出 while True: + led = DigitalInOut(board.CS1) # 定义引脚编号 + led.direction = Direction.OUTPUT # IO为输出 print("熄灭") led.value = 0 # 输出低电平,熄灭板载LED蓝灯 print("点亮")