arduino-libraries / Servo

Servo Library for Arduino
http://arduino.cc/
GNU Lesser General Public License v2.1
233 stars 251 forks source link

Conflict with virtualwire.h library #83

Open saurabhlanje199 opened 2 years ago

saurabhlanje199 commented 2 years ago

It shows

\Servo.cpp.o (symbol from plugin): In function `ServoCount':
(.text+0x0): multiple definition of `__vector_11'

\VirtualWire\VirtualWire.cpp.o (symbol from plugin): first defined here
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for "Servo.h"

The problem is that both Servo.cpp and VirtualWire.cpp try to use the same interrupt vector. Arduino Uno has only a single 16-bit timer, and Servo.cpp library seems to want it. The problem is that VirtualWire library also wants to use the only 16-bit timer available.

PassiSchoppi commented 2 years ago

I experience the same issue with the "Adafruit_VL53L0X.h" library. Have you found a quick fix?

fxf06 commented 2 years ago

There is an answer here. Unfortunately, the two libs use the same timer. Looking for a solution (some mentioned ServoTimer2, but does not this to work either, and I don't how to convert angles into ms...). Seems to be a recurring issue :-(