lot_manager/open_blue_led.py

19 lines
443 B
Python
Raw Normal View History

2024-01-05 16:39:44 +08:00
'''
实验名称熄灭第1个LED
实验平台核桃派
'''
# 导入相关模块
import board
from digitalio import DigitalInOut, Direction
if __name__ == '__main__':
try:
# 构建LED对象和初始化
led = DigitalInOut(board.LED) # 定义引脚编号
led.direction = Direction.OUTPUT # IO为输出
led.value = 1 # 输出高电平点亮板载LED蓝灯
except Exception as e:
pass