error uploading #include <IRremote.h> code

problem arduion ir sensor
when i'm uploading any code with the #include <IRremote.h>
i gets error :
C:\Users\boze\Desktop\arduino-1.6.6\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

^

exit status 1
Error compiling.

it worked before , don't know whats wrong now...

There is a name conflict between the IRremote library and the built-in RobotIRremote library. I get a warning message about it when I compile an IRremote example:

Multiple libraries were found for "IRremote.h"
 Used: /Users/john/Documents/Arduino/libraries/IRremote
 Not used: /Applications/Arduino1.6.6.app/Contents/Java/libraries/RobotIRremote

Do you have the IRremote library installed? Is it in the libraries/IRremote directory under your sketchbook?

I have same problem as boze.

I've installed a clean MacOS Arduino 1.8.0 and when I try to compile my code with

#include <IRremote.h>

I get this error:

/Applications/Arduino.app/Contents/Java/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

Any ideas how to fix it?

thanks,
Łukasz

Hi guys,

I took a look at the offending cpp file and after reviewing it decided that its only a simple wrapper for IR Remote functions and nothing more. I commented it out.

After that my code compiles fine, uploads, and all IR functions are working like a charm.

Maybe it will be useful for somebody.

thanks,
Łukasz