06-21-2023, 05:19 AM
(This post was last modified: 06-21-2023, 05:37 AM by KinCony Support.)
[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
}