Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Question about joystick ports (http://www.chiefdelphi.com/forums/showthread.php?t=133302)

ShaneWong 21-01-2015 18:40

Question about joystick ports
 
Hi, I'm a programmer with team 4732. I have a question about ports. How do you figure out what port your joystick is connected to and what the buttons are mapped as? (I'm using a wired XBox controller if it makes a difference).

Joe Ross 21-01-2015 18:41

Re: Question about joystick ports
 
Take a look at the USB tab of the driver station.

ShaneWong 21-01-2015 20:31

Re: Question about joystick ports
 
Okay thanks. One more thing, I see that the joystick axes and triggers are labeled with numbers, how do I get the numbers for the other buttons? Do the numbers correspond with the squares that light up when I press them?

JefferMC 21-01-2015 22:10

Re: Question about joystick ports
 
Quote:

Originally Posted by ShaneWong (Post 1431846)
Okay thanks. One more thing, I see that the joystick axes and triggers are labeled with numbers, how do I get the numbers for the other buttons? Do the numbers correspond with the squares that light up when I press them?

I believe the numbers correspond with the squares if using Java. If using C++, they're one higher than the console. Not sure about LabView.

TFleig78 21-01-2015 22:14

Re: Question about joystick ports
 
You can also go to "set up USB game controllers" in Windows to see the button numbers and calibrate the joysticks.

Nunez4296 21-01-2015 22:20

Re: Question about joystick ports
 
With the new driver station, any time you plug in a controller, it will default to port 0, and then so on. Next, go to the "USB" section on the driver station. There you will see any connected controllers as well as all the axis and buttons associated with that controller. These buttons are held in an array (in lab view that is) so the first button on the screen (the leftmost top button) will be button zero, the next one down will be button one and so on. As far as Axis, they should be labeled from 1-X straight down. Correct me if I'm wrong, but this is how my team does it.


All times are GMT -5. The time now is 02:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi