Smart Home Automation Forum
[Arduino source code for KC868-1U]-04_IR_send_code - 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-1U (https://www.kincony.com/forum/forumdisplay.php?fid=52)
+--- Thread: [Arduino source code for KC868-1U]-04_IR_send_code (/showthread.php?tid=3007)



[Arduino source code for KC868-1U]-04_IR_send_code - KinCony Support - 06-21-2023

[Arduino source code for KC868-1U]-04_IR_send_code
Code:
/*if download key pressed  send IR signal*/
#include <IRremote.h>
IRsend irsend(5);     
uint8_t sRepeats = 0;

void setup() {

  Serial.begin(115200);
  pinMode(0,INPUT);
  IrSender.begin(5,0);
  IrSender.enableIROut(38);
}

void loop() {
    
        Serial.println("Turn on LED");
        irsend.sendNECRaw(0xF807FF00, sRepeats);   //  0xF807FF00  is the raw_code  of led on
        delay(1000);
        Serial.println("Turn off LED");
        irsend.sendNECRaw(0xF906FF00, sRepeats);  //   0xF906FF00 is the raw_code  of led Off
       
}