Error "Multiple definition of vector 11" while using servo and IRremote librarie

Hi guys, i'm working on a programm wich will control servos and piezzo buzzer and irremote,
Some months ago, my programm worked properly, everything was ok :slight_smile: , but today i click on the verif button of the arduino programm and it's says me an error with "vector 7"where there was tone and ir remote error", bref, i solved this error by searching on internet, it was a problem of timer wich was used to times, so that was solved and now i re-verif the programm and an other error occured this time with the "vector 11" but the error call the "servo" and "irremote" library"
I'm very confused, i already search long time on internet but nothing, i don't now why it doesnt work;
Please help me :slight_smile:

The error :

Servo\Servo.cpp.o: In function __vector_11': C:\Program Files\Arduino\libraries\Servo/Servo.cpp:103: multiple definition of __vector_11'
IRremote\IRremote.cpp.o:C:\Users\salon\Documents\Arduino\libraries\IRremote/IRremote.cpp:311: first defined here

i already search long time on internet but nothing

I searched, using google and "multiple definition of `__vector_11'", and, in 0.69 seconds got more than 2000 hits. I'm absolutely certain that one of them will solve your problem.

Hi guys, first of all, i'm french so my english isn't perfect :slight_smile:
i'm working on a programm wich will control servos and piezzo buzzer and irremote,
Some months ago, my programm worked properly, everything was ok :slight_smile: , but today i click on the verif button of the arduino programm and it's print an error with "vector 7" , there was tone and ir remote error", bref, i solved this error by searching on internet, it was a problem of timer wich was used two times, so that was solved and now i click again on the "verif" button and an new compilation error occured but this time with the "vector 11" but the error call the "servo" and "irremote" library"
I'm very confused, i already search long time on internet but nothing, i don't now why it doesnt work;
because my programm was working properly before and i didn't modify anything :confused:
Please help me :slight_smile:

Maybe, can someone just test the programm to see if it just an error on my computer or in the programm ?

The error :

Servo\Servo.cpp.o: In function __vector_11': C:\Program Files\Arduino\libraries\Servo/Servo.cpp:103: multiple definition of __vector_11'
IRremote\IRremote.cpp.o:C:\Users\salon\Documents\Arduino\libraries\IRremote/IRremote.cpp:311: first defined here

The complete programm :

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

int IR_Recv = 11; //IR Receiver Pin 3
int r_ledPin = 5; //red LED pin 9
int l_ledPin = 3; //barre de led gauche
Servo myservo; // create servo object to control a servo //fffffffffffffffffffffffffffffffffffffff
Servo myservo2; // create second object to control second servo //fffffffffffffffffffffffffffffffff

IRrecv irrecv(IR_Recv);
decode_results results;

void setup(){
Serial.begin(9600); //starts serial communication
irrecv.enableIRIn(); // Starts the receiver
pinMode(r_ledPin, OUTPUT); // sets the digital pin as output
pinMode(l_ledPin, OUTPUT); // sets the digital pin as output
myservo.attach(9); // attaches the servo on pin 9 //ffffffffffffffffffffffffffffffffffffffffff
myservo2.attach(10); //attaches the servo on pin 10 //fffffffffffffffffffffffffffffffffffffffff
}

void loop(){
//decodes the infrared input
if (irrecv.decode(&results)){
long int decCode = results.value;
Serial.println(decCode);

//switch case to use the selected remote control button
switch (results.value){
case 3778927144: //when you press the [1] button

for(int i = 0; i < 5; i++)
{
digitalWrite(r_ledPin, HIGH);
delay(500);
digitalWrite(r_ledPin, LOW);
delay(500);
}

break;

case 1167253836: //when you press the [7] button
digitalWrite(r_ledPin, LOW); // sets the red LED off

break;

case 657459652: //when you press the [3] button

for(int i = 0; i < 5; i++)
{
digitalWrite(l_ledPin, HIGH);
delay(500);
digitalWrite(l_ledPin, LOW);
delay(500);
}

break;

case 2340753640: //when you press the [9] button
digitalWrite(l_ledPin, LOW); // sets the red LED off

break;

case 2908251746: //buzzer song
tone(6, 250); // Send 1KHz sound signal...
delay(300);
noTone(6); // Stop sound...
delay(200);
tone(6, 250); // Send 1KHz sound signal...
delay(800); // ...for 1 sec
noTone(6); // Stop sound...
delay(1000);

break;

case 1931099650: //frein on //fffffffffffffffffffffffffffffffffffffffffff
myservo.write(100);
myservo2.write(100);

break;

case 1747313982: //frein off //ffffffffffffffffffffffffffffffffffffffffff
myservo.write(20);
myservo2.write(20);

break;

}
irrecv.resume(); // Receives the next value from the button you press
}

}

Please help me

We can't. You're french. 8)

You did not read my previous reply. You have not read the stickies at the top of the forum. Why are we to believe that you will read anything else?

No, I've read your previous reply but all the results i've found on google weren't good, i've read ans try a lot of them but it didn't work :slight_smile: , thats why i came on the forum but visibly peoples
are not determined to help each other.

Yes, i though i believe something like this but the problem is how to solve it ?
One time i change that in the "IrRemoteint.h" file to solved but it was an error with the "tone" and the "IRremote".
Decidedly the IRremote library create many issue :confused:

Yes, i though i believe something like this but the problem is how to solve it ?

None of them mentioned using the ServoTimer2 library to resolve the conflict? I find that very difficult to believe.

I have to point out that I have just spent 3 hours using google trying to figure out this error of " multiple definition of `__vector_11' " and nothing was making sense to me. I don't do this for a living and there is a lot of contradictory info out there. But thanks to a few sarcastic responses I now have 2 answers. 1. Why I am getting the error and the other on what to look up to fix it.

Further, it really baffles me that people will engage and make multiple posts about using google and i'm so smart it says right on google search page 8345 that you need to use the servo2timer library....yaddda yadda. It really poisons this community. Give a person a break, just because you googled something doesn't mean it is right or you can understand it. Try googling "snaptic function governing memory formation" and tell me you understand everything without devoting a couple thousand hours to it. I realize this is an old post but I have to comment on how it helped that someone also asked to same question I wanted to and they (eventually) got an answer they could work with. I just wish that people would remember they weren't always all knowing and powerful, they too had to start somewhere and needed some hand holding.

1 Like

First hit in google when searching for arduino irremote vector.

Note that the library has changed; can't check now but I think that the file to modify is now called boarddefs.h.

You can also search this forum for my username in combination with interrupt conflict; one of those post contains a step-by-step guide how to approach the problem.