ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Joystick Button Contol

Hi, I was wondering how to control a motor on the robot with the buttons on the joystick. I am using labview for writing the code.

0 Kudos
Message 1 of 2
(4,842 Views)

Easiest way is to use the "Unbundle" function to get the button you're looking for, and a "Select" function that to send a value to the motor when the button is pressed and 0 to the motor when the button is not pressed.  The wire coming out of the select goes to the motor speed VI.  Looks a bit like this (mocked up, on a computer that has LabVIEW but not the FRC tools):

unbundle button.PNG

0 Kudos
Message 2 of 2
(3,346 Views)