I'm trying to receive remote information with an IR receiver and this is my code:
#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);
irrecv.resume(); // Receive the next value
}
delay(100);
}
I tried to upload this to Arduino and it says:
exit status 1
redefinition of 'int RECV_PIN'
How can I fix this?