While I press different keys on my remote then on the serial monitor of the Arduino will give me the same Decimal value . While set in HEX , it always shows FFFFFF in serial monitor. What is the problem?
// Serial Monitor TSOP 1738 for IR Remote
#include <IRremote.h>
// Define sensor pin
int RECV_PIN = 3;
// Define IR Receiver and Results Objects
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600); // Serial Monitor @9600 baud
Serial.println("Enabling IRin");
irrecv.enableIRIn(); // Start the receiver
pinMode(13,OUTPUT);
}
void loop()
{
if (irrecv.decode(&results))
{
Serial.println("Enabling Active");
Serial.println(results.value,DEC); //Print HEX code
irrecv.resume(); // Receive the next value
}
delay(20);
}
// End of the code