TogetherSword8
17-02-2015, 16:08
Does anyone know how to pull the point of view function off of an xbox controller into labview? I tried using axes 6 and 7, but those did not work for me.
Check this thread (http://www.chiefdelphi.com/forums/showthread.php?t=132616).
RobotMonkey
17-02-2015, 16:30
"Joystick get" outputs three arrays. Axes (doubles), buttons (booleans), and hat switches (ints). Your POV hat is the the first value in the hat switch array. It has a value of -1 if nothing is pressed. Otherwise, it will return the angle in 45 degree increments. So up is 0, up/right is 45, right is 90, down/right is 135, down is 180, down/left is 225, left is 270, and left/up is 315.
Personally, I am using the pov hat to control our camera gimbal. The case shown, 180, is when the dpad is pressed down. In that case, I tilt the camera down by a degree. The max is there to keep it from trying to decrease the angle below 1, which causes the servo to freak out and start skipping backwards.
http://i.imgur.com/V4MxeV8.png
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.