Smart Home Automation Forum
[Arduino IDE demo source code for KC868-AG]--#04--IR receive code - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-AG / AG Pro / AG8 (https://www.kincony.com/forum/forumdisplay.php?fid=30)
+--- Thread: [Arduino IDE demo source code for KC868-AG]--#04--IR receive code (/showthread.php?tid=1676)



[Arduino IDE demo source code for KC868-AG]--#04--IR receive code - KinCony Support - 01-27-2022

Code 3: //The demo code is  IR receive code   You can copy the code to your Arduino IDE

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();

    }
}

   

.zip   KC868-AG-IR_receive.zip (Size: 2.54 KB / Downloads: 261)



RE: [Arduino IDE demo source code for KC868-AG]--#04--IR receive code - admin - 03-30-2022

GOOD