Inconsistent HexCodes on IR receiver

Arduino Card : Arduino Uno R3
Im using Arduino 2.0.4 with IRreceiver library by shirriff.
i have the IRreceiver setup with the arduino card and when i push buttons on my LG remote i keep receiving the same hex code for every input. Please correct me where i am going wrong.
My code is as follows :

#include <IRremote.h>

int receiverpin = 7;
IRrecv irrecv(receiverpin);
decode_results results;

void setup() {
  pinMode(receiverpin, INPUT);
  Serial.begin(9600);
  irrecv.enableIRIn();
}

void loop() {
  if (irrecv.decode(&results))
  {
    Serial.println(results.value, HEX);
    irrecv.resume();
    delay(150);
  }
}

Output is as follows : (i receive same reading for every button i press on the remote.)

12:10:56.169 -> FFFFFFFF

12:10:56.308 -> FFFFFFFF

12:10:56.541 -> FFFFFFFF

12:10:56.716 -> FFFFFFFF

12:10:57.697 -> FFFFFFFF

How have you set it up?
Which IR receiver do you have?
How have you connected it to your UNO?

What version of the IRremote library do you have installed? The code that you posted is written for the older (<3.0) version of the library. See the GitHub page (linked above) to see the changes and how to code for the new version.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.