Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino IDE demo source code for KC868-AG]--#04--IR receive code
#1
Lightbulb 
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)
Reply


Messages In This Thread
[Arduino IDE demo source code for KC868-AG]--#04--IR receive code - by KinCony Support - 01-27-2022, 02:34 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)