Hello
I am trying to get my motor controller to work.
I downloaded AFMotorlibv1.zip and ServoTimer1 and unpacked them.
I was not sure where they should go so I made a directory Arduino/hardware/library/ as suggested on the site where I downloaded the software.
I then compiled the following in Arduino - 0011:
#include <ServoTimer1.h>
ServoTimer1 servo1;
ServoTimer1 servo2;
void setup ()
{
Serial.begin(9600) ; // set up Serial library at 9600 bps
Serial.println("Servo test!") ;
servo2.attach(9) ;
servo1.attach(10) ;
}
void loop ()
{
Serial.print("tick");
servo1.write(180);
servo2.write(0);
delay(1000);
Serial.print("tock");
servo1.write(0);
servo2.write(180);
delay(1000);
}
At first it told me it could not find #include <ServoTimer1.h> so I placed a link to /opt/cross/avr/include and then it seemed able to find it.
Now however I get the following error:
error: expected unqualified-id before numeric constant In function 'void setup()':
In function 'void loop()':
I am not sure what the problem is. I am running Suse 10.2 and am only a novice when it comes to Arduino and programming. Can anyone help.
Thanks
Brian