I am going to make an Flexible IR Remote Controller
#include <IRremote.h>
IRsend irsend;
IRrecv irrecv=IRrecv(11);
decode_results results;
long unsigned int command;
void setup()
{
Serial.begin(9600);
Serial.println("Enabling IRin");
irrecv.enableIRIn(); // Start the receiver
Serial.println("Enabled IRin");
}
void loop() {
while(1){
if(Serial.available()){
String r=Serial.readString();
sendSignal();
}
if (irrecv.decode(&results)) {
Serial.println(results.value,HEX);
if(results.value!=4294967295)
command=results.value;
irrecv.resume(); // Receive the next value
}
}
}
void sendSignal(){
Serial.println(command);
irsend.sendNEC(command, 32);
delay(40);
}
it works at first, but irrecv don't work after when the signal once sended
guys you know how to solve this problem, give me an answer please