Hi, I changed the library as described above, switching to timer 1 rather than 2, but now I am getting a servo error that I wasn't getting before. Previously I was able to control my robot using the irremote.h library as well as the servo.h library. After changing to timer 1, I now am getting what's below. Can anyone help? I read the servo.h library and there is some instructions about the timers, but I don't understand what I should change. My code follows the error. Thank you!
/tmp/992817512/build/libraries/servo_1_1_2/avr/Servo.cpp.o (symbol from plugin): In function `ServoCount':
(.text+0x0): multiple definition of `__vector_11'
/tmp/992817512/build/libraries/IRremote-2.2.3/IRremote.cpp.o (symbol from plugin)

.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
// IRremote-2.2.3 - Version: Latest
#include <ir_Lego_PF_BitStreamEncoder.h>
#include <boarddefs.h>
#include <IRremoteInt.h>
#include <IRremote.h>
/*
The IR sensor's pins are attached to Arduino as so:
Pin 1 to Vout (pin 2 on Arduino)
Pin 2 to GND
Pin 3 to Vcc (+5v from Arduino)
*/
#include <Servo.h>
int IRpin = 4; // pin for the IR sensor
int buzzerPin = 7; //pin for buzzer
int LED = 13; // LED pin
int servoLeftpin = 9;
int servoRightpin = 12;
IRrecv irrecv(IRpin);
decode_results results;
Servo servoLeft; // Define left servo
Servo servoRight; // Define right servo
boolean LEDon = true; // initializing LEDon as true
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
pinMode(LED, OUTPUT);
pinMode(buzzerPin, OUTPUT);
servoLeft.attach(servoLeftpin); // Set left servo to digital pin
servoRight.attach(servoRightpin); // Set right servo to digital pin
}
void loop()
{
if (irrecv.decode(&results))
{
irrecv.resume(); // Receive the next value
}
switch(results.value)
{
case 144:
forward();
reAttach();
break;
case 2192:
reverse();
reAttach();
break;
case 3216:
turnLeft();
reAttach();
break;
case 1168:
turnRight();
reAttach();
break;
case 656:
stopRobot();
break;
case 2064:
slowForward();
reAttach();
break;
case 3088:
slowTurnLeft();
reAttach();
break;
case 2576:
slowTurnRight();
reAttach();
break;
case 3600:
slowReverse();
reAttach();
break;
case 2704:
stopRobot();
break;
// case 16:
// sound();
// break;
default:
digitalWrite(LED, LOW);
}
}
// Motion routines for forward, reverse, turns, and stop
void forward() {
servoLeft.write(0);
servoRight.write(180);
}
void reverse() {
servoLeft.write(180);
servoRight.write(0);
}
void turnRight() {
servoLeft.write(180);
servoRight.write(180);
}
void turnLeft() {
servoLeft.write(0);
servoRight.write(0);
}
void stopRobot() {
servoLeft.detach();
servoRight.detach();
}
void slowForward() {
servoLeft.write(80);
servoRight.write(105);
}
void slowReverse() {
servoLeft.write(105);
servoRight.write(80);
}
void slowTurnRight() {
servoLeft.write(105);
servoRight.write(105);
}
void slowTurnLeft() {
servoLeft.write(80);
servoRight.write(80);
}
void reAttach() {
if(!servoLeft.attached())
servoLeft.attach(servoLeftpin);
if(!servoRight.attached())
servoRight.attach(servoRightpin);
}
//void sound() {
// tone(12,330,500);
// delay(500);
//tone(12,294,500);
//delay(500);
//tone(12,262,500);
//delay(500);
//tone(12,294,500);
//delay(500);
//tone(12,330,500);
//delay(500);
//tone(12,330,500);
//delay(500);
//tone(12,330,1000);
//delay(1500);
//}