#include <IRremote.h>
int RECV_PIN = 11; // IR Receiver - Arduino Pin Number 11
IRrecv irrecv(RECV_PIN);
decode_results results;
int led = 12;
void setup() {
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if(irrecv.decode(&results)) //this checks to see if a code has been received
{
if(results.value == FF6897) //if the button press equals the hex value FF6897
{
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second//do something useful here
}
irrecv.resume(); //receive the next value
}
}
The issue is in the second if in the void loop the error I get is
exit status 1 'FF6897' was not declared in this scope
why does he do this? Why doesnt it just accept my IRcode for comparison.