![]() |
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
|
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 |
Re: Joystick Hat button
haha would love to but we cant find our dashboard cable ^.^ our teams not very clean haha
|
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. |
Re: Joystick Hat button
The dashboard uses a standard serial cable. There is no specialized 'dashboard' cable.
|
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.
|
Re: Joystick Hat button
Quote:
I'm afraid I don't remember the precise values, though. Sorry. |
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 |
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 |
| All times are GMT -5. The time now is 17:54. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi