Go to Post 610 is an all boys school, and we were surprised to see our pit and robot neatly decorated with hot pink boas and flowers upon arrival this morning. - Mr. Lim [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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?
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:42.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi