Controlling an air conditioner and a TV using Arduino and IR LED

Hello everyone;

I am trying to control a carrier air conditioner and a Sony TV using arduino and IR LED.

I used an IR receiver to get raw infrared data. I received the following:

For the carrier air conditioner (ON/OFF):
Decoded NEC: F05F18E0(32 bits)
#define Something_DEC 4032764128
#define Something_HEX F05F18E0
Raw (84): -1886 8400 -4100 500 -1550 600 -1450 600 -1500 550 -1500 600 -450 550 -500 550 -450 600 -450 600 -450 550 -1500 600 -450 550 -1500 600 -1450 600 -1500 550 -1500 600 -1450 600 -450 600 -450 600 -400 600 -1500 600 -1450 600 -450 600 -450 550 -450 600 -1500 550 -1500 600 -1450 600 -450 600 -450 550 -450 600 -450 600 -450 600 -400 600 -1500 600 -400 600 -450 600 -450 600 -1450 600 -1500 550 -1500 600

For the Sony TV (ON/OFF):
FFFFFFFF (0 bits)
#define Something_DEC 4294967295
#define Something_HEX FFFFFFFF
Raw (26): -9500 2400 -550 1250 -550 600 -550 1250 -550 600 -550 1250 -550 600 -550 650 -550 1200 -550 650 -500 700 -550 600 -550 650

I used the IRremote library and the irsend command as follows:

For the air conditioner:

unsigned int incomingint[82]={8400,4100,500,1550,600,1450,600,1500,550,1500,600,450,550,500,550,450,600,450,600,450,550,1500,600,450,550,1500,600,1450,600,1500,550,1500,600,1450,600,450,600,450,600,400,600,1500,600,1450,600,450,600,450,550,450,600,1500,550,1500,600,1450,600,450,600,450,550,450,600,450,600,450,600,400,600,1500,600,400,600,450,600,450,600,1450,600,1500,550,1500,600};

irsend.sendRaw (incomingint, sizeof(incomingint)/sizeof(int), KHz); // air conditioner ON/OFF

I didn’t get any response, although I tried to assign the value of frequency (KHz) to 38, 39, 40 and 41

I connected the anode lead of the IR LED to pin 3 as per the IRremote library

P.S.: I replaced the IR LED with a normal led to check the signal and it lights up

How can I solve this problem.....any advice

Thanks

How can I solve this problem

Have you googled Arduino IR AC? Controlling an A/C with an Arduino with IR appears to be a notoriously difficult proposition. Controlling a TV is simple, because TV manufacturers have agreed on standards defining the protocols and how many times the data needs to be sent (once). Not so with AC manufacturers.

Thanks for your quick response.

I guess I have a problem in the raw data.

I searched for it in the forum....I found that I have to remove the negative signs and I also read that the first number may be an occasional bug with Irremote when decoding in RAW mode.