Go to Post But if FIRST followed a "truth in advertising" philosophy for the registration kits, they would contain six cannisters labeled: "Stress", "Anxiety", "Confusion", "Insomnia", "Dietary Inadequacy", "Unbalanced Priorities" And a really big seventh one labeled "Fun" :) - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2015, 18:40
ShaneWong ShaneWong is offline
Registered User
no team
 
Join Date: Aug 2014
Location: Thunder Bay
Posts: 12
ShaneWong is an unknown quantity at this point
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).
  #2   Spotlight this post!  
Unread 21-01-2015, 18:41
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Question about joystick ports

Take a look at the USB tab of the driver station.
  #3   Spotlight this post!  
Unread 21-01-2015, 20:31
ShaneWong ShaneWong is offline
Registered User
no team
 
Join Date: Aug 2014
Location: Thunder Bay
Posts: 12
ShaneWong is an unknown quantity at this point
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?
  #4   Spotlight this post!  
Unread 21-01-2015, 22:10
JefferMC JefferMC is offline
Registered User
AKA: Jeff Corbett
FRC #1319 (Flash)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2005
Location: United States
Posts: 44
JefferMC will become famous soon enough
Re: Question about joystick ports

Quote:
Originally Posted by ShaneWong View Post
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.
  #5   Spotlight this post!  
Unread 21-01-2015, 22:14
TFleig78's Avatar
TFleig78 TFleig78 is offline
Registered User
AKA: Tyler
FRC #0078 (Air Strike)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Rhode Island
Posts: 58
TFleig78 will become famous soon enoughTFleig78 will become famous soon enough
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.
  #6   Spotlight this post!  
Unread 21-01-2015, 22:20
Nunez4296's Avatar
Nunez4296 Nunez4296 is offline
Programmer
AKA: Joseph Nuņez
FRC #4296 (Trident Robotics)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Gurnee IL
Posts: 39
Nunez4296 is an unknown quantity at this point
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.
__________________
The Eagle - By Alfred, Lord Tennyson

He clasps the crag with crooked hands;
Close to the sun in lonely lands,
Ring'd with the azure world, he stands.

The wrinkled sea beneath him crawls;
He watches from his mountain walls,
And like a thunderbolt he falls.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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