06-21-2023, 05:19 AM
(This post was last modified: 06-21-2023, 05:36 AM by KinCony Support.)
[Arduino source code for KC868-1U]-03_IR_receive_code
Code:
/*KC868-1U IR receive code*/
#include <IRremote.h>
IRrecv irrecv (15);
void setup() {
Serial.begin(115200);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode()) {
Serial.print("irCode address: ");
Serial.println(irrecv.decodedIRData.address,HEX);
Serial.print("irCode command: ");
Serial.println(irrecv.decodedIRData.command,HEX);
Serial.print("irCode decodedRawData: ");
Serial.println(irrecv.decodedIRData.decodedRawData,HEX);
Serial.println();
//delay(1000);
}
IrReceiver.resume();
}