For my project on an arduino mega, I need to use the Servo Library for 2 different servo outputs. I checked on several sources, and the Servo library is supposed to use only timer 5 for the first 12 servos. However, when I try to use another of the 16 bits timers on the arduino with an interrupt, I get the following error when compiling
Servo\Servo.cpp.o: In function `__vector_17': C:\Users\Max\Downloads\arduino-1.0\libraries\Servo/Servo.cpp:103: multiple definition of `__vector_17' PI4.cpp.o:C:\Users\Max\AppData\Local\Temp\build9022493288731351801.tmp/PI4.cpp:51: first defined here
my setup code for the timer:
TCCR3B=13; TIFR3=0x00; TIMSK3=2; OCR3A=174;
I think the refered line in my code is the interrupt function definition:
in this case it's timer 3, but I tried the same for timer 1 and 4. Timer 2 is usable, but I'd prefer a 16 bits timer.
I don't know if I understand the problem correctly, but if that's the problem ,I'd like to know if I can simply alter servo.h or servo.cpp to limit its reach to timer 5, since it will be more than enough for my use.