i just stared messing around with the arduino uno and i’m trying to control a group of leds using a remote kit but when i uploaded the code to the board it gave me a complin which is
: Arduino: 1.8.2 (Windows 7), Board: “Arduino/Genuino Uno”
E:\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: ‘TKD2’ was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
^
Multiple libraries were found for “IRremote.h”
Used: E:\Arduino\libraries\RobotIRremote
Not used: C:\Users\Xtreme\Documents\Arduino\libraries\Arduino-IRremote-master
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.
The code I used was :#include <IRremote.h>
int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;
#define BUTTON_1 0x1
#define BUTTON_2 0x2
#define BUTTON_3 0x3
#define BUTTON_0 0x33
#define BUTTON_OK 0x35
int blue_LED = 7;
int red_LED = 6;
int green_LED = 5;
void setup()
{
pinMode(blue_LED, OUTPUT);
pinMode(red_LED, OUTPUT);
pinMode(green_LED, OUTPUT);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode(&results))
{
if (results.value == BUTTON_0)
{
digitalWrite(blue_LED, LOW);
digitalWrite(red_LED, LOW);
digitalWrite(green_LED, LOW);
}
if (results.value == BUTTON_OK)
{
digitalWrite(blue_LED, HIGH);
digitalWrite(red_LED, HIGH);
digitalWrite(green_LED, HIGH);
}
if (results.value == BUTTON_1)
{
digitalWrite(blue_LED, HIGH);
}
if (results.value == BUTTON_2)
{
digitalWrite(red_LED, HIGH);
}
if (results.value == BUTTON_3)
{
digitalWrite(green_LED, HIGH);
}
irrecv.resume();
}
}
please help me i don’t know what i did wrong