Go to Post And your other point, "why a debate over a nonexistent rule?". Its summer, we're not building robots, and we're geeks. What else are we supposed to do? - EHaskins [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 19-02-2005, 11:16
ten3brousone's Avatar
ten3brousone ten3brousone is offline
Kurayami o Samayou
None #1160
Team Role: Programmer
 
Join Date: Dec 2004
Location: San Marino
Posts: 32
ten3brousone is an unknown quantity at this point
Joystick Hat button

a quick question. for the joystick hat button on top theres 4 ways you can push it. any idea what values the bot recieves when you go forward, left, down, right, on the hat button? 1, 2, 3, 4? or are they each a diff variable. thanks for help
__________________
-Rookie plz bear with me thanks!
  #2   Spotlight this post!  
Unread 19-02-2005, 11:22
phillutz phillutz is offline
Registered User
FRC #0851 (The Froggers)
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2004
Location: El Segundo,CA
Posts: 28
phillutz is on a distinguished road
Re: Joystick Hat button

we coded to test that out last year. Sorry just can't remember the values.
By using your dashboard or printf statments you should be able to display all the joystick values.

Phil
  #3   Spotlight this post!  
Unread 19-02-2005, 11:24
ten3brousone's Avatar
ten3brousone ten3brousone is offline
Kurayami o Samayou
None #1160
Team Role: Programmer
 
Join Date: Dec 2004
Location: San Marino
Posts: 32
ten3brousone is an unknown quantity at this point
Re: Joystick Hat button

haha would love to but we cant find our dashboard cable ^.^ our teams not very clean haha
__________________
-Rookie plz bear with me thanks!
  #4   Spotlight this post!  
Unread 19-02-2005, 15:45
ConKbot of Doom ConKbot of Doom is offline
Team Alumni
FRC #1184 (Cobra Robotics)
Team Role: Leadership
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Maryland
Posts: 153
ConKbot of Doom has a spectacular aura aboutConKbot of Doom has a spectacular aura aboutConKbot of Doom has a spectacular aura about
Re: Joystick Hat button

Then just use printf statements like phillutz said. Edit one of the variables in the printf statement at the end of DefaultRoutine() so that is pX_wheel (X is the port number it is on)


You should see the numbers scrolling by in the terminal window after you load the program.
  #5   Spotlight this post!  
Unread 19-02-2005, 17:38
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Joystick Hat button

The dashboard uses a standard serial cable. There is no specialized 'dashboard' cable.
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
  #6   Spotlight this post!  
Unread 19-02-2005, 18:32
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Joystick Hat button

The POV hat is not wired by default. In order to use it you will have to open the joystick, disassemble the controls, test for continuity to find the POV pins, and rewire it appropriately. I just did ours today, it doesn't take very long to do (so long as you are ok at soldering). Sorry I don't have any pictures to send you, I will open the stick again if I have the time tonight.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #7   Spotlight this post!  
Unread 20-02-2005, 13:13
f00fc7c8 f00fc7c8 is offline
Registered User
#1585
 
Join Date: Feb 2005
Location: Zip Code 14548-9759
Posts: 1
f00fc7c8 is an unknown quantity at this point
Re: Joystick Hat button

Quote:
Originally Posted by ten3brousone
a quick question. for the joystick hat button on top theres 4 ways you can push it. any idea what values the bot recieves when you go forward, left, down, right, on the hat button? 1, 2, 3, 4? or are they each a diff variable. thanks for help
I tested this out the other day using the IFI Dashboard. The POV hatswitch IS wired by default, and you can read it in the variable pFOO_wheel, where FOO is the port number to which your joystick is connected.

I'm afraid I don't remember the precise values, though. Sorry.
  #8   Spotlight this post!  
Unread 20-02-2005, 13:22
Anton's Avatar
Anton Anton is offline
Anton Povzner
#1581 (Element)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Israel
Posts: 51
Anton can only hope to improve
Re: Joystick Hat button

it's a variable called"pFOO_aux",where FOO is the port number to which your joystick is connected.just make a printf for it(i would have checked it myself but I don't use these joysticks).
every time you want to acess a variable and you don;t know how, go to "ifialiases.h". practically everything can be found there
__________________
/*
Anton Povzner, head&tail of team 1581 programming team... and that's just one of the many reasons for us to loose seriously
*/
  #9   Spotlight this post!  
Unread 20-02-2005, 13:31
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,280
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Joystick Hat button

The hat sends a pwm value
Neutral= 45
forward= 254
left = 97
down/left= 163
down= 136'=
down/right= 213
right= 203

Hope that hleps
James
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
Programming motors with joystick buttons TMHStitans Programming 5 21-03-2005 21:07
Joystick Button programming Bharat Nain Programming 5 18-02-2005 11:48
Joystick Button Deference cibressus53 Electrical 3 01-11-2004 09:38
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58


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

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