View Single Post
  #8   Spotlight this post!  
Unread 01-02-2015, 00:53
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Re: Assigning Joystick Buttons?

Those selectors take the boolean input that is given by a button press (True for pressed, False for not) and act accordingly. For example, in Mark's example (on the right), a press button 1 on Joystick 0 sets the relay to forward when pressed and off when not; similarly, press on button 2 on the same joystick sets the relay to reverse. You can also use a case structure for joystick buttons (and I actually prefer these). These work the same way; by taking the boolean input and executing the appropriate process according to it's value.
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
Reply With Quote