View Single Post
  #2   Spotlight this post!  
Unread 15-01-2005, 16:48
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Knobs/Switches for the OI

Inside a joystick, there are 2 potentionmeters that measure x and y axis movement. You can refer to this as x/y pitch/yaw.. whatever...

This is the way the pins on a gameport are arranged (male)


Look at the chart on this site to see which pins relate to which digital/analog input.

Ok so this is what you do.

1. Find an old gameport joystick, or random db-15 cable with male connector.
2. Splice open the cable, and see which wire leads to which pin.

If you want to wire a knob that measures how far it is spun, you want to use whats called a potentiometer. These work like this...


If you connect the wire from the +V wire from the gameport cable to the center pole/lead, the other 2 leads will give you a variable signal depending on where the shaft is.

So if you want to use a pot...

3. Connect pot to cable. Refer to this pot as pN_x in code, where N equals the port number.

4. Wire up switches. You can put up to 4 for each port.

I hope this helped. Reply if you need more help.