View Single Post
  #6   Spotlight this post!  
Unread 07-02-2012, 22:41
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Servo motor help

As Alan said, you'll need to have some type of sensor which supplies feedback based on a setpoint. For example, if you are reading the angle of an extension with a single pivot point, a potentiometer, gyroscope, or encoder will suit your needs.

In this example, you'd read the output, and evaluate if it's the value you want (or at least within a range of values). If it's not, you'll have to set the motor output of the motor controlling the extension to move in either direction, based on the magnitude of your error.

If you are controlling a servo, you can use the Servo Set Angle or Servo Set Position function within the WPI Robotics Library to set the servo to a specific angle or position upon the press of a button.
Reply With Quote