Go to Post Bottom line: hobbiests, hackers, and tinkerers can fiddle with something and make it work. Engineers are people who [b]engineer[/b] solutions to problems. - Dave Flowerday [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 24-05-2007, 22:52
fondyfire12's Avatar
fondyfire12 fondyfire12 is offline
Bj Giese
AKA: Bj Giese
FRC #2194 (Fondy Fire)
Team Role: Driver
 
Join Date: May 2007
Rookie Year: 2006
Location: Wisconsin
Posts: 4
fondyfire12 is an unknown quantity at this point
Exclamation XBOX button

I am currently learning C and am programming are robot to use the 360 controller, and I want to use the Xbox button as a "turbo" button to speed up the robot a little. Can anyone please give me a code I can try, or at least a tip? You can email it to me at bj.giese@gmail.com. Thanks.
  #2   Spotlight this post!  
Unread 25-05-2007, 00:54
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 button

I assume you are using a Chicklet to interface with the XBox 360 controller.

The XBox button is not mapped to an output on the chicklet. That button is not even available on a computer, so I'm guessing you would need special, non-HID, drivers to get the buttons's state.

The port mappings for the Chicklet are available in this manual.

EDIT: If you are looking for code not specific to the 360 controller PM or e-mail me.
__________________
Eric Haskins KC9JVH
  #3   Spotlight this post!  
Unread 25-05-2007, 01:47
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: XBOX button

Speaking of the chicklets, from what I've read, I need to do some process to edit the buttons on the xbox and convert them to analog outputs(p1_x, p1_y, p1_trig etc.).
If so, can anyone explain a bit? I didn't quite understand from the manual, it looks complicated. : \
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
  #4   Spotlight this post!  
Unread 25-05-2007, 08:17
fondyfire12's Avatar
fondyfire12 fondyfire12 is offline
Bj Giese
AKA: Bj Giese
FRC #2194 (Fondy Fire)
Team Role: Driver
 
Join Date: May 2007
Rookie Year: 2006
Location: Wisconsin
Posts: 4
fondyfire12 is an unknown quantity at this point
Question Re: XBOX button

Yes We are using the chicklet. But on the chart that says buttons for 360 controller it says "center X button." So it is supported but i can't find out how to actually use it.
  #5   Spotlight this post!  
Unread 25-05-2007, 12:13
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 button

I should have read the entire manual.

You will need to go through the calibration routine. During step 5 you can select which buttons will be used. Instructions can be found on page 4 of the manual I linked to above.

If you need more help I'm on MSN/Live Messenger(my handle is in my profile) almost all day.
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 25-05-2007 at 12:16.
  #6   Spotlight this post!  
Unread 25-05-2007, 13:03
tseres's Avatar
tseres tseres is offline
obsessed with FIRST...
FRC #1565 (Think Tank Tech)
Team Role: Leadership
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Cambridge, ON
Posts: 305
tseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of light
Re: XBOX button

usb controllers that the chicklet supports have more buttons than the analog OI port can handle. we used the 360 controller this year. i'm pretty sure you can use the giant X button, but i'm not 100% sure cez we didnt. in the chicklet manual it shows the different "modes" some modes allow more buttons than axes. if you intend on using both joysticks, then you'll only be able to use 4 digital buttons. but, if you only choose to use certain axes, you can use more buttons. what the chicklet does is takes unuses analog channels and assigns each bit a digital value.

0000 0000 - this is a BYTE, or 8 BITS

when you use the extra buttons feature, the last 4 bits of an analog byte get assigned values

0000 0001 - this is what happens when a button assigned (when you onfigure the chicklet...instructions are in the manual posted above).
in binary, this is a value of 1

0000 0010 - this is a value of 2

0000 0100 -this is a value of 4

0000 1000 - this is a value of 8

0001 0000- 16
0010 0000- 32
0100 0000- 64
1000 0000- 128

this is all you need to know. so when you configure the chicklet and press the buttons you configures to it, the actual analog output going to the OI equals one of the above.

so lets say the A button is 8....to make the robot way that the A button has been pressed would look like this:

if(p1_aux==8){ //p1_aux is the auxilary analog channel on port 1
Do_something(); //when the button is pressed, insert what you need
}


this is just an example, but this is basically how the chicklet works. read through the manual for more. if you need and more help, feel free to PM me.

good luck and have fun

~tseres
__________________


  #7   Spotlight this post!  
Unread 25-05-2007, 13:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: XBOX button

Quote:
Originally Posted by tseres View Post
...when you use the extra buttons feature, the last 4 bits of an analog byte get assigned values...
...read through the manual for more...
Read through the manual for the correct information. It's the top four bits (128, 64, 32, 16) which represent digital switch values. You should test the individual bits rather than the analog value as a whole, as the lower few bits cannot be guaranteed to be consistent.

There are 17 supported buttons on an Xbox 360 controller. The Chicklet can assign any 12 of them to be sent to the joystick port, four as "real" switch inputs and eight encoded in the Wheel and Aux analog values. Using it this way means you can only get "real" joystick values from two of the possible four axes on the controller. You can choose to get x and y inputs from both the left and right joysticks, but that restricts you to a total of four switch inputs. This is all in the Chicklet manual.
  #8   Spotlight this post!  
Unread 25-05-2007, 13:33
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: XBOX button

Ok, that should be more easier to understand. Thanks.
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
  #9   Spotlight this post!  
Unread 25-05-2007, 15:39
tseres's Avatar
tseres tseres is offline
obsessed with FIRST...
FRC #1565 (Think Tank Tech)
Team Role: Leadership
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Cambridge, ON
Posts: 305
tseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of light
Re: XBOX button

Quote:
Originally Posted by Alan Anderson View Post
Read through the manual for the correct information. It's the top four bits (128, 64, 32, 16) which represent digital switch values.
my mistake. but the concept is still the same. i have some code we used this year. i'll post it later when i can find it.
__________________


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 akedomakona Chit-Chat 29 31-03-2007 14:58
who has xbox live Masterfork Chit-Chat 9 16-08-2006 21:50
XBox 360 Joe Matt Chit-Chat 83 29-11-2005 15:18
XBOX PEOPLE, HELP Freddy Schurr Chit-Chat 5 25-06-2005 12:21
Xbox 360 zdeswarte General Forum 1 11-05-2005 14:53


All times are GMT -5. The time now is 01:21.

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