[arduino source code for KC868-Uair-6] IR remoter button decode - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20) +--- Forum: KC868-Uair (https://www.kincony.com/forum/forumdisplay.php?fid=31) +--- Thread: [arduino source code for KC868-Uair-6] IR remoter button decode (/showthread.php?tid=1575) |
[arduino source code for KC868-Uair-6] IR remoter button decode - admin - 01-02-2022 #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: Uair_IR_receive.zip (Size: 569 bytes / Downloads: 283) Note: install "IRremote" library online firstly. set IR sender and receiver GPIO pins define as below image: |