Thread: Button coding
View Single Post
  #7   Spotlight this post!  
Unread 28-02-2016, 11:41
Potatonator's Avatar
Potatonator Potatonator is offline
much potato very robot wow
FRC #4360 (Spudnik)
 
Join Date: Feb 2014
Rookie Year: 2012
Location: Moorhead, MN
Posts: 15
Potatonator is an unknown quantity at this point
Re: Button coding

Quote:
Originally Posted by Pratik Kunapuli View Post
Code:
if(joystick.getRawButton(buttonNumber)
{
    speedController.set(1.0);
}
else
{
    speedController.set(0.0);
}
If this code is in the periodic teleop method, it should do what you want.
Is there any way to set this to run from multiple joysticks? For instance, having button 1 on joystick 1 start and button one on joystick 2 stop it?
Reply With Quote