Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[arduino source code for KC868-Uair-6] IR remoter button decode
#1
#include "PinDefinitionsAndMore.h"
#include <IRremote.h>

void setup() {
  Serial.begin(9600);
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN);
}

void loop() {
    if (IrReceiver.decode()) {
        
        IrReceiver.printIRResultShort(&Serial);
        if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
          
            IrReceiver.printIRResultRawFormatted(&Serial, true);
        }
        Serial.println();
    IrReceiver.resume();
    }
}


download arduino IDE source code file: 

.zip   Uair_IR_receive.zip (Size: 569 bytes / Downloads: 291)
Note: install "IRremote" library online firstly.
   

set IR sender and receiver GPIO pins define as below image:
   
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)