when im uploading the code it is giving me an error:
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
libraries\Arduino-IRremote-master\IRremote.cpp.o (symbol from plugin): In function `IRrecv::blink13(int)':
(.text+0x0): multiple definition of `MATCH(int, int)'
sketch\sketch_may28a.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Arduino-IRremote-master\IRremote.cpp.o (symbol from plugin): In function `IRrecv::blink13(int)':
(.text+0x0): multiple definition of `MATCH_MARK(int, int)'
sketch\sketch_may28a.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Arduino-IRremote-master\IRremote.cpp.o (symbol from plugin): In function `IRrecv::blink13(int)':
(.text+0x0): multiple definition of `MATCH_SPACE(int, int)'
sketch\sketch_may28a.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
and this is my code:
#include <IRremote.h>
#include <IRremoteInt.h>
int RECV_PIN = 3;
int led1 = 2;
int led2 = 4;
int led3 = 7;
int itsONled[] = {0, 0, 0, 0};
#define code1 63495
#define code2 30855
#define code3 22695
IRrecv irrecv(3);
decode_results results;
void setup()
{
Serial.begin(9600); // you can comment this line
irrecv.enableIRIn(); // Start the receiver
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
void loop() {
if (irrecv.decode(&results)) {
unsigned int value = results.value;
switch (value) {
case code1:
if (itsONled[1] == 1) {
digitalWrite(led1, LOW);
itsONled[1] = 0;
} else {
digitalWrite(led1, HIGH);
itsONled[1] = 1;
}
break;
case code2:
if (itsONled[2] == 1) {
digitalWrite(led2, LOW);
itsONled[2] = 0;
} else {
digitalWrite(led2, HIGH);
itsONled[2] = 1;
}
break;
case code3:
if (itsONled[3] == 1) {
digitalWrite(led3, LOW);
itsONled[3] = 0;
} else {
digitalWrite(led3, HIGH);
itsONled[3] = 1;
}
break;
}
Serial.println(value);
irrecv.resume();
}
}