diff --git a/close_led.py b/close_led.py new file mode 100644 index 0000000..bec846b --- /dev/null +++ b/close_led.py @@ -0,0 +1,20 @@ +''' +实验名称:点亮第1个LED +实验平台:核桃派 +''' + +#导入相关模块 +import board +from digitalio import DigitalInOut, Direction +if __name__ == '__main__': + + try: + # 构建LED对象和初始化 + led = DigitalInOut(board) # 定义引脚编号 + led.direction = Direction.OUTPUT # IO为输出 + + led.value = 1 # 输出高电平,点亮板载LED蓝灯 + + # led.value = 0 #输出低电平,熄灭板载LED蓝灯 + except: + pass diff --git a/conf/device/device.conf b/conf/device/device.conf index 6ed4607..fd2560e 100644 --- a/conf/device/device.conf +++ b/conf/device/device.conf @@ -16,8 +16,8 @@ subscribe_topic=lihai_lot_walnutpi_dev_2 # 发布消息的主题 publish_topic=camera_2 info_topic=info_dev_2 -username=lihai_lot_land_1 -password=lihai_lot_land_1 +username=18783045599 +password=18783045599 #################################### # 设备3-64G [lihai_lot_walnutpi_dev_3] @@ -26,8 +26,8 @@ subscribe_topic=lihai_lot_walnutpi_dev_3 # 发布消息的主题 publish_topic=camera_3 info_topic=info_dev_3 -username=lihai_lot_land_1 -password=lihai_lot_land_1 +username=13433212473 +password=13433212473 #################################### # 设备4-64G [lihai_lot_walnutpi_dev_4] @@ -36,8 +36,8 @@ subscribe_topic=lihai_lot_walnutpi_dev_4 # 发布消息的主题 publish_topic=camera_4 info_topic=info_dev_4 -username=lihai_lot_land_1 -password=lihai_lot_land_1 +username=17685151643 +password=17685151643 #################################### # 设备5-64G [lihai_lot_walnutpi_dev_5] @@ -46,8 +46,8 @@ subscribe_topic=lihai_lot_walnutpi_dev_5 # 发布消息的主题 publish_topic=camera_5 info_topic=info_dev_5 -username=lihai_lot_land_1 -password=lihai_lot_land_1 +username=13698151291 +password=13698151291 #################################### # 设备6-64G [lihai_lot_walnutpi_dev_6]