04-21-2022, 08:35 AM
(This post was last modified: 04-22-2022, 01:17 AM by KinCony Support.)
Code:
#include <IRremote.h>
IRsend irsend_23(23); // set ir_send pin IO23
uint8_t sRepeats = 0;
void setup() {
Serial.begin(9600);
pinMode(0,INPUT);
IrSender.begin(23, ENABLE_LED_FEEDBACK);
IrSender.enableIROut(38);
}
void loop() {
/*the raw_code of your remote button,you can get it by our
example [Arduino IDE demo source code for KC868-SERVER]--#02-IR_RECEIVE code*/
Serial.println("Turn on LED");
irsend_23.sendNECRaw(0xF807FF00, sRepeats); // 0xF807FF00 is the raw_code of led on
delay(1000);
Serial.println("Turn off LED");
irsend_23.sendNECRaw(0xF906FF00, sRepeats); // 0xF906FF00 is the raw_code of led Off
delay(1000);
}
This code will turn on LED and delay 1s turn off LED
The raw_data of LED on is 0xF807FF00 ,you can decode the data by our example code
"[Arduino IDE demo source code for KC868-SERVER]--#02-IR_RECEIVE code"