Hello!
So I have an issue, probably an easy to answer one, with receiving the IR hex codes. The problem is that if I reset my board or plug it in/out a few times to my computer the hex codes change.
Any ideas why the hex codes are changing?
Example of pressing the same button:
irCode: FF4AB, bits: 28
irCode: FFFFFFFF, bits: 0
irCode: 1BC0157B, bits: 32
irCode: 1BC0157B, bits: 32
irCode: 1BC0157B, bits: 32
Generated by the following code:
#include <IRremote.h>
const int irReceiverPin = A3;
const int ledPin = 13;
IRrecv irrecv(irReceiverPin);
decode_results results;
void setup()
{
pinMode(ledPin,OUTPUT);
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop()
{
if (irrecv.decode(&results)) {
Serial.print("irCode: ");
Serial.print(results.value, HEX);
irrecv.resume();
}
delay(600);
if(results.value == 0xFFA25D)
{
digitalWrite(ledPin,HIGH);
}
else
{
digitalWrite(ledPin,LOW);
}
}