Go to Post If winning that individual match is more important to you than being there in the first place, then I believe you've got your priorities in the wrong spot. - Tom Bottiglieri [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 07-02-2007, 13:41
Inverted Inverted is offline
Registered User
AKA: Eric P.
FRC #1228 (Robo Tribe)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Rahway, NJ
Posts: 25
Inverted is an unknown quantity at this point
Send a message via AIM to Inverted
Programming Extra Joystick Buttons

I just had a question about how the joystick buttons are programmed. We're using a joystick that has more buttons than the default code has assigned. I was looking at how they're assigned, and just wanted to know if the "bit#" at the end of the RC feedback variable corresponds to the pin on the connector. In other words, say the button I want to assign uses pin 14 of the connector, would that be "xx.xxxxxx.bit14"? If not, how would I be able to figure out the bit value?
  #2   Spotlight this post!  
Unread 07-02-2007, 13:49
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,576
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Programming Extra Joystick Buttons

The OI Reference Guide availible from http://ifirobotics.com/oi.shtml shows the pinouts of the joystick ports and the appropriate variables on pages 7-10.

The ones listed are the only ones connected. If you have a joystick with switches on other pins, you will have to make your own adapter so that they map to the correct pins.
  #3   Spotlight this post!  
Unread 08-02-2007, 11:45
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Programming Extra Joystick Buttons

Quote:
Originally Posted by Joe Ross View Post
The OI Reference Guide availible from http://ifirobotics.com/oi.shtml shows the pinouts of the joystick ports and the appropriate variables on pages 7-10.

The ones listed are the only ones connected. If you have a joystick with switches on other pins, you will have to make your own adapter so that they map to the correct pins.
And a lot of this depends on the joystick. I have a CH FighterStick Pro that has 16 buttons on it, but each of them is mapped to a combination of the four available buttons on the OI pin, so you can write a simple state machine mapping these buttons to 16 separate states (as long as you are comfortable with not being able to have two buttons pressed at the same time).

In any case, each OI port only allows 4 switch inputs. To get more, you need to either wire to other ports, or make a circuit that encodes the extra switchs as analog inputs (this is how the USB Chicklet handles extra buttons, for example).
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
Victors Controlled By Joystick Buttons douglass1371 Electrical 2 17-02-2006 01:57
Programming motors with joystick buttons TMHStitans Programming 5 21-03-2005 21:07
Victors controlled with joystick Buttons JamesBrown Programming 2 18-02-2005 23:39
Using the extra buttons on the joystick. Code\\Pilot Programming 7 04-12-2004 19:30
Assigning Joystick buttons.... archiver 2001 5 24-06-2002 00:59


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

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