Smart Home Automation Forum

Full Version: [arduino source code for KC868-Uair-6] IR remoter button decode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
#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: 
[attachment=455]
Note: install "IRremote" library online firstly.
[attachment=456]

set IR sender and receiver GPIO pins define as below image:
[attachment=459]