Arduino获取红外信号 孙鸿飞 | 2025-7-21 18:20 | 12 | 程序 46 字 | 3 分钟 #include <Arduino.h> #define IR_PIN 2 void setup() { Serial.begin(115200); pinMode(IR_PIN, INPUT); } unsigned long pulseDuration(bool level) { unsigned long t = micros(); w…