problem ir decode and send


i have air conditioner remote control not belong decode recognized in library irremote.h (nec no, no, sony, etc), means sketch
code: [select]

#define sprint serial.print
#define sprintln serial.println
#include <irremote.h>

#define ir_rcvr_pin 11
irrecv ir_receiver(ir_rcvr_pin);
decode_results results;

void setup() {
    serial.begin(9600);
    ir_receiver.enableirin(); // start receiver
}

void loop() {
   if (ir_receiver.decode(&results)) {
    dump(&results);
    ir_receiver.resume(); // receive next value
   }
}

int c = 1;

void dump(decode_results *results) {
   int count = results->rawlen;
   sprintln(c);
   c++;
   sprintln("for ir scope: ");
   for (int = 1; < count; i++) {
       sprint("0x");
       sprint((unsigned int)results->rawbuf[i], hex);
    sprint(" ");
   }

   sprintln("");
   sprintln("for arduino sketch: ");
   sprint("unsigned int raw[");
   sprint(count, dec);
   sprint("] = {");
   for (int = 1; < count; i++) {
       sprint("0x");
       sprint((unsigned int)results->rawbuf[i], hex);
       sprint(",");
    }
    sprint("};");
    sprintln("");
    sprint("irsend.sendraw(raw,");
    sprint(count, dec);
    sprint(",38);");
    sprintln("");
    sprintln("");
}

i tried change raw, nothing when send result obtained program air conditioner not turn on.
how should do?
it may problem khz (the program defaults 38)? whether there program tells me how send khz
my remote control?
thanks beforehand
ps
my air conditioner dell'haier



Arduino Forum > Using Arduino > Programming Questions > problem ir decode and send


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support