Hello
I want to ask your help with problem that occur in the code for the first time,
“libraries\PCM\PCM.c.o (symbol from plugin): In function startPlayback': (.text+0x0): multiple definition of __vector_11’
libraries\Servo\avr\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.”
I suspect both libraries are trying to use the same interrupt handler. Vector 11 though, is the Timer 1 Input Capture vector, according to the Uno’s data sheet, which seems an unusual choice.
However, the data sheet counts from 1, not zero. If the compiler counts from zero, then it’s the Timer 1 Compare Match A interrupt – which makes more sense.
Basically, these two libraries can’t be used together.
Correct. Both your PWM based sample playback and your servo motor use the same timer to operate and want to hook the same interrupt function --they’re incompatible.
hello sir. I also have the same problem: I want to connect my servo+ waterlevel sensor (connect to firebase) code to my webcamserver code. it seems that both codes got config declaration in them which I think is the problem on why i cannot run it simultaneously.
pic showing the “config” I’m talking abt. Is there any other way?
Not yet, There is a solution for your problem by switching lib from using “Servo.h” To “PWMServo.h”.|
All you need to do is install pwmservo and #include <PWMServo.h> instead off #include <Servo.h> while keeping all your code as it is and this will solve your problem,
Happy crafting mate.