摘要: PIO-esp32程序,间歇输出,串口获取delay time #include <Arduino.h> // 定义LED引脚(ESP32-WROOM-32板载LED:GPIO2) #define LED_PIN 2 #define SW_PIN 16 // 全局变量:闪烁间隔(默认500ms) u 阅读全文
posted @ 2025-12-04 15:48 为鲸 阅读(3) 评论(0) 推荐(0)
摘要: import threading import time import serial # 导入pyserial,用于串口初始化/读取 # 全局变量:存储IO状态(供其他模块调用) global_io_state = {"serial_data": None, "gpio_status": 0} # 阅读全文
posted @ 2025-12-04 15:45 为鲸 阅读(7) 评论(0) 推荐(0)