01-27-2022, 02:34 AM
(This post was last modified: 01-27-2022, 02:35 AM by KinCony Support.)
Code 3: //The demo code is IR receive code You can copy the code to your Arduino IDE
KC868-AG-IR_receive.zip (Size: 2.54 KB / Downloads: 260)
Code:
#include "PinDefinitionsAndMore.h"
#include <IRremote.h>
void setup() {
Serial.begin(9600);
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN);
//IR_RECEIVE_PIN is defined in PinDefinitionsAndMore.h file IO23
}
void loop() {
if (IrReceiver.decode()) {
IrReceiver.printIRResultShort(&Serial);
if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
IrReceiver.printIRResultRawFormatted(&Serial, true);
}
Serial.println();
IrReceiver.resume();
}
}
KC868-AG-IR_receive.zip (Size: 2.54 KB / Downloads: 260)