Thread: Servo Help
View Single Post
  #1   Spotlight this post!  
Unread 17-02-2013, 17:57
zackd97 zackd97 is offline
Registered User
FRC #4102
 
Join Date: Feb 2013
Rookie Year: 2013
Location: New Mexico
Posts: 16
zackd97 is an unknown quantity at this point
Servo Help

I'm trying to write code that will cause a servo to move to one position for a certain amount of time and then move back to where it was. This is in a command based system. So far what I've tried are different functions for open, close, and done that are along the lines of this-

void GateServo::Open(){
gateTwo->Set(0);
}

and

void GateServo::Close(){
gateTwo->Set(.5);

and

void GateServo::done(){
gateTwo->SetOffline();
}

In this case gateTwo is the servo itself. I'm calling these functions in two different commands that are then put in a command group that calls the commands sequentially. The problem is that it doesn't do anything. Am I doing anything wrong and/or is there a better way of doing it? Any help is appreciated.

Last edited by zackd97 : 17-02-2013 at 19:37. Reason: Typo
Reply With Quote