Page 1 of 1

help air conditioners ir raw

Posted: Fri Jun 20, 2014 9:43 am
by qwertyroby
hi
i have used
http://www.analysir.com/blog/2014/03/19 ... s-arduino/
guide for record my ir raw for Air Conditioners
once recorded the ir, how should I do to send it to the air conditioner ?
I tried so but it does not work

Code: Select all

#include <IRremote.h>



IRsend irsend;
 unsigned int power_ON[229] ={ 3068, 3060, 3048, 4428, 592, 1624, 592, 524, 592, 1604, 608, 524, 616, 480, 612, 1624, 592, 1596, 608, 512, 632, 480, 612, 1624, 592, 1624, 592, 1620, 616, 1580, 612, 504, 612, 496, 612, 504, 612, 504, 612, 1604, 612, 1604, 612, 500, 616, 1600, 612, 1624, 592, 496, 612, 508, 612, 500, 616, 500, 612, 524, 592, 504, 612, 504, 612,504, 612, 496, 612, 504, 612, 504, 612, 1604, 612, 504, 612, 1604, 608, 524, 592, 504, 612, 496, 612, 508, 612, 504, 636, 480, 612, 1600, 612, 504, 612, 504, 636, 480, 612, 496, 612, 508, 608, 524, 596, 500, 612, 1604, 612, 524, 592, 1600, 636, 480, 612, 516, 592, 1596, 612, 504, 612, 1624, 640, 472, 592, 1604, 612, 504, 612, 1600, 612, 496, 616, 1592, 636, 480, 612, 504, 612, 504, 612, 500, 636, 480, 612, 504, 612, 496, 636, 484, 612, 504, 612, 504, 608, 504, 612, 504, 612, 504, 636, 480, 612, 496, 612, 508, 612, 500, 612, 508, 608, 504, 612, 504, 612, 504, 636, 500, 592, 492, 616, 504, 612, 504, 636, 480, 612, 504, 612, 504, 612, 504, 612, 500, 616, 492, 612, 508, 612, 504, 636, 480, 612, 504, 612, 504, 632, 480, 612, 1604, 612, 496, 612, 1596, 612, 500, 612, 1604, 636, 1580, 636, 1576, 636, 1580, 636, 1580, 612, 516, 592, 1588, 636 };
void setup()
{
  Serial.begin(9600);
}
void loop() {


  if (Serial.read() != -1) {
    for (int i = 0; i < 1; i++) {
      irsend.sendRaw(power_ON, 229, 3);
      delay(40);
    }
  }
}
my conditioners air is haier

Re: help air conditioners ir raw

Posted: Fri Jun 20, 2014 1:04 pm
by AnalysIR
Hi
I can see one error, so change the following line

Code: Select all

irsend.sendRaw(power_ON,  sizeof(power_ON)/sizeof(int), 38);
The modulation frequency is usually 38 (kHz) [you had 3] and using 'sizeof' is just easier because you dont have to calculate the length manually.

If you still have problems, record the same power-on signal several times and verify that the first 4 values remain consistent.

Re: help air conditioners ir raw

Posted: Fri Jun 20, 2014 1:09 pm
by AnalysIR
It's always a good idea to try out all of the examples provided with the IRremote or IRLib library first and test it out on your TV. That way you can better avoid some of the basic pitfalls.


Also, check out our blog post on:
Arduino: 10 common pitfalls with Infrared Remote Control
http://www.analysir.com/blog/2014/03/05 ... e-control/