Thread: Button coding
View Single Post
  #2   Spotlight this post!  
Unread 23-02-2016, 10:29
Pratik Kunapuli's Avatar
Pratik Kunapuli Pratik Kunapuli is offline
Probably browning-out on Astro-Turf
FRC #1648 (G3 Robotics)(EWCP)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Atlanta, GA
Posts: 143
Pratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to all
Re: Button coding

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.
__________________
Official Driving Record: 101-59-0
2012-2015 Student 341 Miss Daisy
2015-Current Mentor 1648 G3 Robotics

Last edited by Pratik Kunapuli : 23-02-2016 at 10:31.
Reply With Quote