Buttons

How do you program buttons to activate an additional motor attached to your joystick? For instance, If I wanted to connect the trigger of our right joystick, where and how would we code that? We have a Logitech Attack 3 joystick and are using labview, if that helps.

Use the ‘unbundle’ tool. Wire the Joystick’s button node to unbundle’s node, and you should be good to go. If no options pop up at first, try right clicking the unbundle VI and add an element.

It should work just like the axes, except the buttons only return Boolean variables. Good Luck! :smiley:

In Teleop

  1. position the cursor over the Buttons output node on the Joystick Get
  2. right-click for the menu
  3. Choose Cluster, Class and Variant
  4. Choose Unbundle By Name (the first choice)
  5. Place it on the Block Diagram to the right of the Joystick Get
    *]Wire the Joystick Get Button node to the Unbundle and you should see “Button 1” appear. Expand or change the button to get the buttons you want.

Unbundle as the previous posts have mentioned, and then, to program a motor function, you can:

1.) Use a case structure to decide how the motor functions, or

2.) Use a true/false selector to pass through a number value; if all you’re doing is controlling motor speed, this way is easier than a case structure.

Also, from what I hear, try not to go overboard with putting buttons on the joystick. Let the operator do most of the button pushing, and let the driver do , well, the driving! It makes the driver’s job easier.

You can also check out this thread, Alan Anderson was nice enough to post a picture of what the Labview code should look like.

thank you ALL but now our other issue stopping is the motor running for the shooter. We want to program the button on our joystick. We programmed it so there is 3 variable speeds and one button stopping each of these programs but also so we can re initate the program. TRUST ME we can stop the program (i.e. we have a button that stops teleop.vi completely so we need to re deploy it) thank you
-Team 4085 Technical Difficulties