Go to Post Team 71: So good at Strategy they already have figured out next years game before the GDC has even met. - IKE [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
__________________


 


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 19:38.

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