Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino source code for KC868-A32M]-02_IR_receive_code
#1
[Arduino source code for KC868-A32M]-02_IR_receive_code
Code:
#include <IRremote.h>
IRrecv irrecv_16(16);// set ir_receive pin IO16
void setup() {

  Serial.begin(115200);
  irrecv_16.enableIRIn();
}

void loop() {
    if (irrecv_16.decode()) {
      if(irrecv_16.decodedIRData.decodedRawData!=(0)){
        Serial.print("irCode address: ");           
        Serial.println(irrecv_16.decodedIRData.address,HEX);
        Serial.print("irCode command: ");           
        Serial.println(irrecv_16.decodedIRData.command,HEX);
        Serial.print("irCode decodedRawData: ");           
        Serial.println(irrecv_16.decodedIRData.decodedRawData,HEX);
      }
      IrReceiver.resume();
    }
}
   


Attached Files
.zip   KC868-A32M_IR_receive_code.zip (Size: 673 bytes / Downloads: 171)
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)