IR servo control code. error message can not figure it out. Help please

I get this error message when I try to compile the code;

c:\Program Files\Arduino\libraries\RobotIRremote\scr\IRremotetools.cpp:5:16: error: 'TKD2' was not declared in scope
int RECV_PIN = TKD2; // the pin the ir receiver is connected to

Any help would be most appreciated. I am new at this but trying.

I am trying to control a servo with the remote control that came in the kit.
Thanks

Sorry about that.....

#include <Servo.h>
#include <IRremote.h>

unsigned long Value1 = 0xFFA25D; // where XXXXXXXX is on our your remote's values
unsigned long Value2 = 0xFF629D; // where XXXXXXXX is another button on your remote

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

Servo servo1;

// the setup routine runs once when you press reset:
void setup() {

Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver

// initialize the digital pin as an output.

servo1.attach(10); // attack servo to digital pin 10
}

// the loop routine runs over and over again forever:
void loop() {

if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}

if(results.value == Value1) {
servo1.write(160);
}
else if (results.value == Value2){
servo1.write(75);
}
}

If you put [ code] and [ /code] (without those spaces) around your code, it will format it and look much prettier for us. :slight_smile:

Delta_G:
A very tiny little bit of google and I was able to come up with this:

GitHub ยท Where software is built

Almost to the bottom of comments:

I have had the issue he is having.

Here's what you can do - try this:

Delete (or move out of the Library folder to keep as backup) the RobotIRRemote folder. Then, get this one from github. That should work.

Alternatively, from the RobotIRRemote/src folder, delete (or, again, move out of the libraries folder) "IRRemotetools.cpp" and "IRremotetools.h".

Thank you for your Help.

How can I get rid of this "RobotIRremote" folder. When I open libraries the folder does not seem to exist.
But if I open sketches-libraries-I find it, but can not delete it...
Any sugestions?

Thank you that helped.
I was able to remove the file. Now I just need to add the new library.

Sorry but for some reason I can not get this to work. I have unzipped the IR files into the libraries folder and the sketch still does not work.
Any suggestions?

I am happy to say that after several hours of playing, I finally got my IR remote to operate the servo/
The problem was the library not having the right IR information.
I was not loading the correct IR library into the program.
With the help of you all here, I was able to figure out how to do this, then it worked.
I am new to this and I do thank you for your help.
IT is going to be an interesting hobby!