Answer the question
In order to leave comments, you need to log in
Arduino + IRremote.h + toy helicopter remote control?
Hello, friends!
There is such a helicopter:
and an arduino with an IR receiver and a transmitter.
I would like to use this remote control to control the arduino. Having connected the IRremote library and running the IRrecvDump sketch, I saw this when I pulled the traction handle on the remote control:
0<br/>
Could not decode message<br/>
0Raw (52): 31508 2050 -2000 350 -250 350 -650 350 -250 350 -700 300 -300 350 -250 350 -250 350 -250 350 -250 350 -250 350 -700 350 -650 350 -650 350 -650 350 -700 350 -650 350 -250 300 -300 350 -250 350 -250 350 -700 350 -250 350 -650 350 -650 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -32614 2050 -1950 350 -250 350 -700 350 -250 350 -650 350 -250 350 -300 300 -300 300 -300 350 -250 350 -250 350 -650 350 -650 350 -700 350 -650 350 -650 300 -700 350 -300 300 -300 350 -250 350 -650 350 -250 350 -250 350 -650 350 -300 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31814 2000 -2000 350 -250 350 -700 350 -250 350 -650 350 -250 350 -300 300 -300 300 -300 350 -250 350 -250 350 -650 350 -650 350 -650 400 -650 350 -650 300 -700 350 -250 350 -300 350 -250 350 -650 350 -650 350 -650 400 -250 350 -650 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -32664 2050 -1950 400 -200 350 -700 350 -250 350 -650 350 -250 350 -300 300 -300 300 -300 350 -250 350 -250 350 -650 350 -650 350 -700 350 -650 350 -650 300 -700 350 -300 300 -300 350 -650 350 -250 350 -250 350 -650 400 -650 350 -250 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31814 2050 -2000 350 -250 350 -650 350 -250 350 -700 300 -300 350 -250 300 -300 300 -300 350 -250 350 -250 350 -700 350 -650 350 -650 350 -650 350 -650 350 -700 350 -250 350 -250 350 -650 350 -700 300 -700 350 -650 300 -300 350 -250 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -32364 2000 -2000 350 -250 350 -700 350 -250 350 -650 350 -250 350 -300 300 -300 300 -300 350 -250 350 -250 350 -650 350 -650 350 -700 350 -650 300 -700 300 -700 350 -300 300 -700 350 -250 350 -650 350 -250 350 -250 350 -300 350 -650 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31764 2050 -1950 350 -300 350 -650 350 -250 350 -650 350 -250 350 -300 300 -300 300 -300 350 -250 350 -250 350 -650 350 -700 350 -650 350 -650 350 -650 300 -700 350 -300 300 -700 300 -700 300 -750 300 -300 300 -300 350 -650 300 -700 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31264 2000 -2000 350 -250 350 -650 350 -250 350 -650 350 -300 300 -300 300 -300 350 -250 350 -250 350 -250 350 -700 300 -700 350 -650 350 -650 350 -700 300 -700 300 -300 350 -650 350 -700 300 -300 300 -700 300 -700 350 -250 300 -700 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -30664 2000 -2050 350 -250 300 -700 350 -250 350 -650 350 -250 350 -300 300 -300 300 -300 300 -300 350 -250 350 -650 350 -700 300 -700 350 -650 350 -650 350 -700 350 -250 350 -650 350 -250 350 -650 350 -300 300 -300 300 -300 300 -300 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): 32722 2050 -1950 350 -250 350 -650 350 -300 300 -700 350 -250 300 -300 350 -250 350 -250 350 -250 350 -300 300 -700 350 -650 350 -700 300 -700 300 -700 300 -700 300 -300 350 -250 350 -700 350 -650 350 -650 300 -350 300 -250 350 -300 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -32014 2000 -2000 350 -250 350 -650 350 -300 300 -700 350 -250 350 -250 300 -300 350 -250 350 -250 350 -300 300 -700 300 -700 350 -650 350 -650 350 -700 350 -650 300 -300 350 -250 350 -700 300 -300 300 -300 300 -300 300 -700 350 -650 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31664 2000 -2000 350 -250 350 -650 350 -250 350 -700 350 -250 300 -300 300 -300 350 -250 350 -250 350 -300 300 -700 300 -700 350 -650 350 -700 300 -700 350 -650 300 -300 300 -300 350 -250 350 -700 300 -300 300 -700 350 -650 350 -250 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31764 2050 -1950 350 -250 350 -300 300 -700 300 -700 350 -650 350 -650 350 -700 300 -700 350 -250 300 -300 350 -650 350 -700 350 -650 350 -650 350 -700 300 -700 300 -300 300 -300 350 -250 300 -300 350 -250 350 -300 300 -300 300 -300 350 <br/>
0<br/>
Could not decode message<br/>
0Raw (52): -31714 2050 -1950 350 -300 350 -250 300 -700 300 -700 350 -650 350 -700 350 -650 300 -700 350 -300 300 -250 350 -700 350 -650 350 -650 350 -700 300 -700 350 -650 300 -300 300 -300 350 -250 350 -250 350 -300 300 -300 300 -300 350 -250 350 <br/>
Answer the question
In order to leave comments, you need to log in
You can get HEX codes, but I'm afraid they won't help much.
#include <IRremote.h>
int RECEIVE_PIN = 2;
IRrecv irrecv(RECEIVE_PIN);
decode_results results;
int a, b, c, d;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop()
{
if (irrecv.decode(&results))
{
//Serial.println("0x");
//Serial.println(results.value, HEX);
a=(results.value&0x000000FF);
b=(results.value&0x0000FF00)>>8;
c=(results.value&0x00FF0000)>>16;
d=(results.value&0xFF000000)>>24;
Serial.print(a, HEX);Serial.print(".");
Serial.print(b, HEX);Serial.print(".");
Serial.print(c, HEX);Serial.print(".");
Serial.println(d, HEX);
delay(50);
irrecv.resume();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question