Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino IDE demo source code for KC868-AI]--#02-KC868-AI_IR receive_code
#1
[Arduino IDE demo source code for KC868-AI]--#02-KC868-AI_IR receive_code

Code:
#include <WiFiUdp.h>


#include "PinDefinitionsAndMore.h"
#include <IRremote.h>

void setup()
{
  Serial.begin(115200);
  Serial.println();
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN);

}

void loop()
{

    if (IrReceiver.decode()) {

        // Print a short summary of received data
        IrReceiver.printIRResultShort(&Serial);
        if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
            // We have an unknown protocol here, print more info
            IrReceiver.printIRResultRawFormatted(&Serial, true);
        }
        Serial.println();
     IrReceiver.resume(); // Enable receiving of the next value
    }
  delay(30);
 
}


Attached Files
.zip   IR.zip (Size: 3.16 KB / Downloads: 219)
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)