Log in

View Full Version : XBox 360 triggers


ahudson
20-01-2015, 20:53
New programmer with new LabView. We need to program a gearbox to go one direction by pushing a trigger button and reverse the direction with the other trigger button. We have not gotten anywhere with our attempts. Any help?

Mark McLeod
20-01-2015, 22:40
Here's a generic example of driving a motor by button.

http://team358.org/files/programming/ControlSystem2015-2019/labview/ButtonDriveExample.png

The xBox right/left triggers though are actually treated as axis 2 & 3, so you'd need a variation.
The Left and right triggers produce a floating point number from 0.0-1.0
So give yourself a little wiggle space and replace the button feeds in the example with the checks:Axis 2 > .1 (or .5)
Axis 3 > .1

So something like this:
http://team358.org/files/programming/ControlSystem2015-2019/labview/ButtonAxisDriveExample.png

ahudson
23-01-2015, 21:31
Thank you, Mark! We are now running all three motors!