View Single Post
  #2   Spotlight this post!  
Unread 09-02-2013, 11:28
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Servo programming

Code:
public void operatorControl() {

if(joystick.getRawButton(3))
{
servo.set(1);
} 
else if(joystick.getRawButton(4))
{
servo.set(-1);
}

}
This should be running in a loop. Like this
Code:
while(isOperatorControl()) {
    // Code here
}
__________________
All opinions are my own.
Reply With Quote