Go to Post Don't get mad, learn, and get even. - Eric O [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 16-02-2010, 17:10
viper110110 viper110110 is offline
Registered User
FRC #1325
 
Join Date: Jan 2009
Location: Mississauga
Posts: 41
viper110110 has a spectacular aura aboutviper110110 has a spectacular aura aboutviper110110 has a spectacular aura about
Xbox 360 controller

We have an xbox controller connected to the ds and it works fine for the left stick and most of the buttons. How do we get the x and y values for the right stick?
  #2   Spotlight this post!  
Unread 16-02-2010, 17:17
seventhapollo seventhapollo is offline
Registered User
FRC #1477
 
Join Date: Dec 2009
Location: The Woodlands, TX
Posts: 5
seventhapollo is an unknown quantity at this point
Re: Xbox 360 controller

What platform are you using (C++, Java, or LV)?

One thing to ensure is that in Game Controllers (from the Control Panel) you can see your x and y axes moving with the stick. Then it's simply a code issue.
  #3   Spotlight this post!  
Unread 16-02-2010, 17:28
viper110110 viper110110 is offline
Registered User
FRC #1325
 
Join Date: Jan 2009
Location: Mississauga
Posts: 41
viper110110 has a spectacular aura aboutviper110110 has a spectacular aura aboutviper110110 has a spectacular aura about
Re: Xbox 360 controller

We are using java

I'm pretty sure the right stick works as I have used it at home for games. I will try what you said and see.
  #4   Spotlight this post!  
Unread 16-02-2010, 19:21
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Xbox 360 controller

Code:
//definitions
Joystick stick = new Joystick(1);

//usage
float axis = stick.getRawAxis(axisNumber); //see table below for axis numbers
boolean button = stick.getRawButton(buttonNumber);
Axis indexes:
1 - LeftX
2 - LeftY
3 - Triggers (Each trigger = 0 to 1, axis value = right - left)
4 - RightX
5 - RightY
6 - DPad Left/Right

Button mapping matches Windows Control Panel>Game Pads display
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 16-02-2010 at 19:24.
  #5   Spotlight this post!  
Unread 16-02-2010, 21:50
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Xbox 360 controller

but remember to buffer the xbox controller, for this reason, im most likely gonna ditch the much-requested 360Drive on my team's robot
  #6   Spotlight this post!  
Unread 16-02-2010, 22:00
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Xbox 360 controller

the Logitech ps2-like controller works very well. I would recommend it to anyone having problems with the 360 controller. We are driving with one, the same one that drove us in 2008 and its still running without issue at all.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #7   Spotlight this post!  
Unread 18-02-2010, 19:42
[TBT] Vampire's Avatar
[TBT] Vampire [TBT] Vampire is offline
Spartan-034
AKA: Dinkel
FRC #2865 (Roboteknix)
Team Role: Mechanical
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Post Falls, Idaho
Posts: 91
[TBT] Vampire is on a distinguished road
Send a message via MSN to [TBT] Vampire
Re: Xbox 360 controller

Lol that'd be so cool to do, but we don't have enough time to figure that out.
I'm super jealous >.<
  #8   Spotlight this post!  
Unread 18-02-2010, 19:58
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Xbox 360 controller

Quote:
Originally Posted by apalrd View Post
the Logitech ps2-like controller works very well. I would recommend it to anyone having problems with the 360 controller. We are driving with one, the same one that drove us in 2008 and its still running without issue at all.
That one is also less than half the price of a 360 controller. I've had good luck with that one as well.
__________________
Eric Haskins KC9JVH
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xbox 360 Controller Rumble bubushkinator C/C++ 5 09-02-2010 15:05
Xbox 360 controller LabView CJBrick General Forum 12 17-12-2008 13:58
xbox 360 controller installation kuelin Technical Discussion 17 07-01-2008 19:43
Chicklet with MS XBOX 360 controller 354.FIRST Control System 2 19-04-2007 16:29
chicklet USB/xbox 360 controller spsteam1512 Control System 1 10-01-2007 23:14


All times are GMT -5. The time now is 12:58.

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