I built my motor shield today
Moved onto the next step sending it code to do something fun, and I get an error with the lib, when I try to compile.
I downloaded it from:
http://www.arduino.cc/playground/ComponentLib/Servo
------------------------------ My Code --------------------------------
#include <ServoTimer1.h>
ServoTimer1 servo1;
ServoTimer1 servo2;
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Servo test!");
servo1.attach(10);
servo2.attach(9);
}
void loop() {
Serial.print("tick");
servo1.write(180);
servo2.write(0);
delay(1000);
Serial.print("tock");
servo1.write(0);
servo2.write(180);
delay(1000);
}
The Errors are below.
Thank you for the help getting this working.
ServoTimer1.cpp: In static member function 'static void ServoTimer1::seizeTimer1()':
ServoTimer1.cpp:47: error: 'TIMSK' was not declared in this scope
ServoTimer1.cpp:47: error: 'TICIE1' was not declared in this scope
o: In function __static_initialization_and_destruction_0': C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:6: undefined reference to
ServoTimer1::ServoTimer1()'
C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:7: undefined reference to `ServoTimer1::ServoTimer1()'
o: In function loop': C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:19: undefined reference to
ServoTimer1::write(int)'
C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:20: undefined reference to `ServoTimer1::write(int)'
C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:24: undefined reference to `ServoTimer1::write(int)'
C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:25: undefined reference to `ServoTimer1::write(int)'
o: In function setup': C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:12: undefined reference to
ServoTimer1::attach(int)'
C:\Users\admin\AppData\Local\Temp\build78.tmp/Temporary_7308_905.cpp:13: undefined reference to `ServoTimer1::attach(int)'
Couldn't determine program size: C:\Temp\arduino-0015-win\arduino-0015\hardware/tools/avr/bin/avr-size: 'C:\Users\admin\AppData\Local\Temp\build78.tmp\Servo_Test.hex': No such file