Go Down

Topic: Can't get IRrecvDemo example to work as expected (Read 1 time) previous topic - next topic

luxxtek

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

JoeO

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.

luxxtek

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

Code: [Select]
/*
* 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
  }
}

JoeO

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.
http://www.adafruit.com/products/389

JoeO

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

Go Up