¿How to decode a control remote?

Wear 4 days trying to decode a remote control and I return the hexadecimal values ??of each button that I press, the code I use is this:

#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}

I think if I installed the wrong library, I’ve downloaded from here: is this:

and I’ve set as follows:

-Untarred the file and put the folder name that came into the name I gave is “IrRemote” then take the folder arduino> libraries, then between Arduino and installs import library.

  • I went to File File I / examples / IrRemote / IRrecvDemo

  • Load the program and went to the Arduino Serial monitor window, but I did not miss anything, but when I disconnect the cable to the IR I get a lot of codes in hexadecimal.

I think my mistake was to install the library, but nose, I hope your answer …

Ir modules work on different frequencies. Do you have the right one?
When troubleshooting, take small steps. Each step should have the purpose of isolating and identifiying the source of error.
One way to start would be this:

void setup(){
  pinMode(13, OUTPUT);
}//setup()

void loop(){
  digitalWrite(13, digitalRead(11));
}//loop()

This will enable you to see whether the ir module receives anything. In that case the error is in the module or in the remote.
You should not make any assumptions on where the source of the error is, but normally libraries work the way they should if used properly

What hardware do you use, whats your wireing? I recently used that lib and it worked just fine and just as shown in the examples.

As per previous post, let us know which model of Arduino you are using.

Also, let us know how you have wired it up.

IRremote is pretty robust.

One likely culprit, is if you have connected the IR receiver incorrectly. So which model are you using (provide a link to the data sheet) and which pins on the Arduino have you connected it to.

Do you know if your remote control is working? (as that would be a fundamental issue, if it was not working)

Hi, Maybe it would help to read through THIS: on the ArduinoInfo.Info WIKI

Check that you have your IR receiver connected properly.

Also, try any other remotes (TV, etc) you may have. Most should work.

Hi, I´m using Arduino Uno, the IR (TSOP4838) and my control works perfectly, the "+" of IR I conected to 3.5V

http://arduino-info.wikispaces.com/IR-RemoteControl

If you are using the UNO, then why con connect '+' to 5V. Could be some issue running it at 3.3V in a 5V circuit.

Only other thing would be to confirm that you actually have a TSOP4838.

I presume you connected pin 1 on the IR receiver to pin 11 on the UNO, pin 2 to GND pin 3 to Vcc (I think it would be better to go with 5V).

Then if that doesn't work, enalble the PULLUP as per one of the earlier post.

Yeah, now I conected to 5V and work :), but the IR no are going to burn??

Only a question, what would the code for turn on and turn off a LED with this decimal 16593103?? ((The decimal are of the control remote))

The example in your first post is from the IRemote library examples.

To send, start off with the send examples in the IRremote library.

You will also need to figure out the protocol of your remote. (NEC,sony,RC6,RC5 etc....). You should be able to get that in another example with the IRremote library.

I am not sure what you meant by 'burn'. But if you want to connect an IR LED to you Arduino - use a resistor in serie with the IR LED. Search for an example circuit - there are many available on this forum and via google.

I want to turn on a LED with control remote, this is the code of the buttun 4105841032, the LED is conected to the pin 9 and the receiver of IR is conected to the PIN 11.

I have this:

/*
 * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
 * An IR detector/demodulator must be connected to the input RECV_PIN.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 */

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  pinMode(9, OUTPUT);
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if(results.value== 3778927144){
    digitalWrite(9,HIGH);
}
  }

I hope this isnt the real problem!

3778927144 ------------>4105841032

:)

already corrected and nothing, please help

Keep the serial code of the IRremote example in sketch and just add the LED part. Then you see what happens on the IR side of the problem.