lot_manager/close_led.py

19 lines
456 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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