R
R
RuslanCC2012-01-14 08:08:47
Arduino
RuslanCC, 2012-01-14 08:08:47

Arduino + IRremote.h + toy helicopter remote control?

Hello, friends!
There is such a helicopter:
111.jpg
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/>

Sorry for the wall of text.
When I read codes from conventional remotes (from TV, for example), I received a HEX code at the output and identified the command using it. Here, instead of a HEX code, I get 0. What should I do with this RAW data?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Heinrich Schulz, 2014-08-20
@gkoh90

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();
       }
   }

If you pull the thrust, the following data will fall into the serial port:
9.2B.1F.33
B9.EB.3C.1A
9A.77.DB.35
C0.7D.6E.17
82.43.A0.B4
DB.D9.95.A7
10.A1.73.D2
28.57.13.F0
46.D7.5C.B4
44.21.F2.AD
49.DE.29.14
DB.48.E3.69
7.7AE5B
3A.76.F5.B6
DE.A8.EC .5E
71.E0.8.B1
AD.F3.10.2D
68.1B.D1.F6
65.CC.C6.B6
C3.10.79.C9
8C.AD.1A.6B

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question