Go to Post FIRST needs a disclaimer that parts of the field can become flying projectiles under hurricane force winds. - Barry Bonzack [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-10-2013, 06:43 PM
atucker4072's Avatar
atucker4072 atucker4072 is offline
Andrew Tucker
AKA: Andrew Tucker
FTC #4968 (Rapid Robotics)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Glenwood Springs, Co
Posts: 152
atucker4072 has a spectacular aura aboutatucker4072 has a spectacular aura aboutatucker4072 has a spectacular aura about
Gamepads with java

Our team is planning on switching to the Logitech gamepads in place of the joysticks. We have also just made the switch to java as well. If we could get help on programming the gamepads that would be great. Sample code would be great too.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-11-2013, 01:24 AM
vinnie's Avatar
vinnie vinnie is offline
Registered User
FRC #3309 (Friarbots)
Team Role: College Student
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Los Angeles / Anaheim
Posts: 107
vinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond repute
Re: Gamepads with java

I wrote this class for our Xbox controllers. https://github.com/Team3309/FRC2013/...ontroller.java

If you use Xbox controllers, this should work out-of-the-box for you, but if not it is still a good starting point. I have had a lot of trouble getting the analog triggers to work with the controller, so the methods to get the triggers (not the bumpers) do not actually work.
If you use a controller other than an Xbox controller you can try this class out and if it doesn't work (just print out the values and see if its what you're expecting) then modify the constants in the beginning of the class until the methods return the right values for their respective axis or button.
__________________
Student (3309) 2010-2013
Mentor (597) 2014
Mentor (3309) 2013-Present
Reply With Quote
  #3   Spotlight this post!  
Unread 05-11-2013, 01:47 AM
BrianArneson BrianArneson is offline
Registered User
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Apr 2013
Rookie Year: 2009
Location: Colorado
Posts: 15
BrianArneson is an unknown quantity at this point
Re: Gamepads with java

Our team have used Logitech gamepads as do many other teams, so there is plenty of knowledge available about them. This is 443's code from past years. I happened to upload it for my new team but you can check out 2010 post_season for basic working controller code. Others I personally didn't program and the programming may be a bit confusing but also use Logitech gamepads. https://www.dropbox.com/sh/f1xr15jivz7imqv/IhtSzBDaTO
__________________
7 year FRC participant
Mentor on FIRST Team 662 - 2 years
Former student FIRST Team 4550 - 1 year
Former student FIRST Team 443 - 4 years

Last edited by BrianArneson : 05-11-2013 at 07:46 PM. Reason: Forgot the link
Reply With Quote
  #4   Spotlight this post!  
Unread 05-11-2013, 08:44 AM
atucker4072's Avatar
atucker4072 atucker4072 is offline
Andrew Tucker
AKA: Andrew Tucker
FTC #4968 (Rapid Robotics)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Glenwood Springs, Co
Posts: 152
atucker4072 has a spectacular aura aboutatucker4072 has a spectacular aura aboutatucker4072 has a spectacular aura about
Re: Gamepads with java

Quote:
Originally Posted by BrianArneson View Post
Our team have used Logitech gamepads as do many other teams, so there is plenty of knowledge available about them. This is 443's code from past years. I happened to upload it for my new team but you can check out 2010 post_season for basic working controller code. Others I personally didn't program and the programming may be a bit confusing but also use Logitech gamepads.
Where is the link to your code?
Reply With Quote
  #5   Spotlight this post!  
Unread 05-11-2013, 07:51 PM
BrianArneson BrianArneson is offline
Registered User
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Apr 2013
Rookie Year: 2009
Location: Colorado
Posts: 15
BrianArneson is an unknown quantity at this point
Re: Gamepads with java

I added the link to previous post. Sorry for forgetting.
__________________
7 year FRC participant
Mentor on FIRST Team 662 - 2 years
Former student FIRST Team 4550 - 1 year
Former student FIRST Team 443 - 4 years
Reply With Quote
  #6   Spotlight this post!  
Unread 05-12-2013, 05:20 PM
thecakeisalie's Avatar
thecakeisalie thecakeisalie is offline
Registered User
FRC #0293
 
Join Date: Mar 2012
Location: Pennington
Posts: 37
thecakeisalie is an unknown quantity at this point
Re: Gamepads with java

This post was helpful to us this year.
http://www.chiefdelphi.com/forums/sh...80&postcount=4
Reply With Quote
Reply


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 07:46 AM.

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