I just finished my program to turn off my lightswitch with a TV remote when I got this error message. I have spent some time looking around the forum to see if there is a fix but I cannot find one. If someone could please help me out that would be great
IRremote/IRremote.cpp.o: In function `MATCH(int, int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/IRremote/IRremoteInt.h:176: multiple definition of `MATCH(int, int)'
Remote_Controlled_Light_Switch.cpp.o:/Applications/Arduino.app/Contents/Resources/Java/libraries/IRremote/IRremoteInt.h:176: first defined here
IRremote/IRremote.cpp.o: In function `MATCH_MARK(int, int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/IRremote/IRremoteInt.h:177: multiple definition of `MATCH_MARK(int, int)'
Remote_Controlled_Light_Switch.cpp.o:/Applications/Arduino.app/Contents/Resources/Java/libraries/IRremote/IRremoteInt.h:177: first defined here
IRremote/IRremote.cpp.o: In function `MATCH_SPACE(int, int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/IRremote/IRremoteInt.h:178: multiple definition of `MATCH_SPACE(int, int)'
Remote_Controlled_Light_Switch.cpp.o:/Applications/Arduino.app/Contents/Resources/Java/libraries/IRremote/IRremoteInt.h:178: first defined here
Here is my code
#include <IRremote.h>
#include <IRremoteInt.h>
#include <Servo.h>
Servo servo;
int IRpin = 11;
IRrecv irrecv(IRpin);
decode_results results;
void setup(){
pinMode(13, OUTPUT);
IRrecv irrecv(IRpin);
servo.attach(9);
}
void turnOn(){
servo.write(80);
delay(2000);
servo.write(90);
digitalWrite(13, HIGH);
}
void turnOff(){
servo.write(105);
delay(2000);
servo.write(90);
digitalWrite(13, LOW);
}
void loop(){
if (irrecv.decode(&results))
{
irrecv.resume();
}
if (results.value == 1752382022)
{
turnOn;
}
if (results.value == 2209452902)
{
turnOff;
}
}