Hello....I am using an arduino uno with a adafruit wav shield. I got a conflict with the serv.ccp and waveHC.ccp over using Timer1. I am trying to work around by using ServoTimer2 but with the simplest sketch I get these errors:
sketch_may14b.cpp.o: In function __static_initialization_and_destruction_0': C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:7: undefined reference to ServoTimer2::ServoTimer2()'
C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:8: undefined reference to ServoTimer2::ServoTimer2()' sketch_may14b.cpp.o: In function loop':
C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:19: undefined reference to ServoTimer2::write(int)' C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:21: undefined reference to ServoTimer2::write(int)'
C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:24: undefined reference to ServoTimer2::write(int)' C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:26: undefined reference to ServoTimer2::write(int)'
sketch_may14b.cpp.o: In function setup': C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:12: undefined reference to ServoTimer2::attach(int)'
C:\Users\cappy\AppData\Local\Temp\build987738042993949936.tmp/sketch_may14b.cpp:13: undefined reference to `ServoTimer2::attach(int)'
The code is as follows:
#include <ServoTimer2.h> // the servo library
ServoTimer2 a;
ServoTimer2 b;
void setup()
{
a.attach(5);
b.attach(6);
}
void loop()
{
a.write(2000);
delay(500);
a.write(1000);
delay(500);
b.write(2000);
delay(5000);
b.write(1000);
delay(500);
}
I have found several versions of ServoTimer2 here and at the Adafruit forum. None of them are working for me. Please advise!
Thank you!!
Cappy Jack