View Single Post
  #1   Spotlight this post!  
Unread 24-03-2011, 18:03
Charlie675 Charlie675 is offline
Registered User
FRC #0675
 
Join Date: Jan 2010
Location: Sebastopol, CA
Posts: 7
Charlie675 is an unknown quantity at this point
Servo motor isn't working

We are trying to get a servo to work and it won't even move. We've tried different servos and different PWM ports, but nothing happens. We are currently using this piece of code to test the servo:
Code:
Servo servo(4,8);
float servoRange = servo.GetMaxAngle() - servo.GetMinAngle();
for (float angle = servo.GetMinAngle(); angle < servo.GetMaxAngle(); angle += servoRange / 10.0) { 
	servo.SetAngle(angle); // set servo to angle 
	printf("%f\n",servo.GetAngle());
	Wait(1.0); // wait 1 second 
}
Any suggestions?