View Single Post
  #2   Spotlight this post!  
Unread 06-02-2009, 16:59
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
Re: need help with motors

I'm not positive what you're asking, but I think you want this:

Code:
if( joyStick.GetRawButton( 2 ) ) {
    motorSpeedController.Set( 1.0f ); // where motorSpeedController is either a Victor or Jaguar, run it at full forward
} else {
    motorSpeedController.Set( 0.0f ); // stop the motor when button two isn't pressed
}