View Single Post
  Spotlight this post!  
Unread 24-01-2004, 19:14
FotoPlasma FotoPlasma is offline
\: |
no team
 
Join Date: Jul 2001
Rookie Year: 2001
Location: San Jose
Posts: 1,900
FotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond repute
Send a message via AIM to FotoPlasma
Re: Programming joysticks

The joystick's POV hat takes the place of the "pN_wheel", where N is the number of the joystick port you're using. I can only really speak for the joystick which I have right in front of me (the other is at my house, being used to play TIE Fighter ), so YMMV. The two least significant bits of the value change too erratically to be of any use. Here's a listing of the values of the variable when the POV hat is in different positions:
Neutral: 001011xx
Up Left: 111111xx
Up: 111111xx
Up Right: 111111xx
Left: 011000xx
Right: 110010xx
Down Left: 101001xx
Down: 100101xx
Down Right: 110101xx

The x's take the place of the two least significant bits, which, as I said earlier, change randomly (at least with this single joystick).

Basically, if you can understand binary, you can take advantage of the POV hat for controlling your robot.

Hope this helps.
__________________
I played hacky sack with Andy Baker.

2001-2004: Team 258, The Sea Dawgs
2005: Team 1693, The Robo Lobos