Hi all!
So I am trying to do basic motions with a Servo Motor (everything is wired correctly) using the code from the sweep example (Here it is for reference):
// Sweep
// by BARRAGAN http://barraganstudio.com
#include <Servo.h>
Servo myservo; // create servo object to control a servo
int pos = 0; // variable to store the servo position
void setup()
{
myservo.attach(3); // attaches the servo on pin 9 to the servo object
}
void loop()
{
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
When I compile and upload, the motor pulses, then does nothing. No sweeps occur. I have imported the library, and there is communication to the motor (or at least the pulsing of the Servo leads me to believe this). My board also isnt fried, since I can do other things with it(potentiometer readings, etc). Does anybody have any idea whats goin on?? Thanks in advance!!