I followed a couple tutorial on how to receive and send IR codes to control air conditioner the receiving part is working fine and I copied the IR data of the remote control but the problem I am having is sending these codes via IR led can't seem to get it to work can someone help me please.
This the code to send the date via IR LED
#include "IRremote.h"
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
int khz=38; //NB Change this default value as neccessary to the correct modulation frequency
// ON and 2O C° with 1 FAN heat
unsigned ON[] ={4400,4300,550,1600,550,500,600,1550,550,1600,550,500,550,550,550,1550,550,550,550,500,550,1600,550,500,600,500,550,1550,600,1550,600,500,550,1550,600,500,550,500,600,500,550,1600,550,1550,550,1600,550,1600,550,1550,600,1550,600,1550,550,1600,550,500,550,550,550,500,550,550,550,500,550,550,550,1550,550,550,550,500,550,1600,550,500,550,550,550,500,550,1600,550,500,600,1550,600,1550,550,500,600,1550,550,1600,550,1550,600};
unsigned OFF[] ={4350,4350,550,1550,550,550,550,1600,500,1600,550,550,500,550,550,1600,550,550,500,550,550,1600,500,550,550,550,500,1600,550,1600,550,500,550,1600,550,550,500,1600,550,1600,550,1600,550,1600,550,500,550,1600,550,1550,550,1600,550,550,500,550,550,550,500,550,550,1600,500,550,550,550,500,1650,500,1600,550,1600,550,500,550,550,550,500,550,550,550,500,550,550,550,500,550,500,600,1550,550,1600,550,1600,500,1650,500,1600,550};
void loop() {
irsend.sendRaw(ON, sizeof(ON)/sizeof(int), khz);
delay(5000);
irsend.sendRaw(OFF, sizeof(OFF)/sizeof(int),khz);
delay(5000);
}
The problem is my A/C doesn't detect IR codes.