Can't get IRrecvDemo example to work as expected

I bought the DFRobot IR Remote controller kit and tried to use it with the IRrecvDemo.
Many applications can be found that are based on the IRrecvDemo, but none seem to work for me.
Without making changes to IRrecvDemo, I tried it with IDE 23 but my Serial.print always shows 8 character values rather than the 6 character values as illustrated below

I always get 8 digit hex codes like these:

25802501
CBD2CCFD
FFFFFFFF
57E346E1
D9EF995E
B1EFBA9D
B1EFBA9D
6E2B307C
6BFD8B01
1E29FBFF
925D5B5D
1E90961
FFFFFFFF

As a result the code cannot work

else if(results.value==0xFD906F)
{
motor(-40,-40);
}

I'm sure the hardware is OK, the sample code found here IR_Kit_SKU_DFR0107_-DFRobot works OK. Note that this sample code does not use the IRremote.h library.

Any help would be appreciated.

As a result the code cannot work

You can specify any value that the device received as the value to match to:

if(results.value==0xD9EF995E)
{
   // Got D9EF995E...
}

Post your code.

/*
 * 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()
{
  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
  }
}

The code that tries to use the values that you have recorded, not the code that printed them.

I'm at the office right now, can't access the sketch I used to test.
I"ll post it tonight.
Thanks so far.

I have the exact same IR remote.

One side note:
The FFFFFFFFs are the remote sending the repeat code if you hold the button down too long.

Here is the code. For testing I only added to check if the "VOL +" button is pressed.

Results are not very consistent and I wonder why I don't see the codes as shown here

as explained on this page http://www.e-shore.com.my/homepage/all-projects/193-ir-remote-control-mobile-robot.html

Do various versions of this remote exist ? I would expect them to use the same hex codes

/*
 * 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()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    
    if(results.value==0xC9C3741)
      {
      Serial.println("VOL + pressed");
      }
      else
      {
      Serial.println("other button pressed");
      }    
    irrecv.resume(); // Receive the next value
  }
}

This line
if(results.value==0xC9C3741)

Should be:
if(results.value==0xFD807F)

Yes, I have one that is physically and coded the same but has a different plastic overlay.

I downloaded your code, put my fix on it and it decodes the VOL+ equivalent key on my remote.
It decodes all of the remote's keys.

There may be a problem in your hardware. Please post good pictures so that individual wires/connections can be traced.

JOe

I have this one

and apparently it generates different codes

My code works but sometimes buttons are missed and I have to press again to get a positive result.

I was confused because I thought I read abnormal HEX codes but I looks like a have an IR remote control that sends different codes.

I agree with you, the code is fine. I also believe that the remote control is correct.

There is something else going on, battery in the remote control is bad or something is wrong in the arduino hardware.
Good luck.