I have been experimenting with creating custom controls to use for future robots. So far, I have the wiring completed, but I have been having trouble finding the right variables to use for certain pins on the controller. According to this website (http://pinouts.ru/Inputs/GameportPC_pinout.shtml) each game port has pins for 2 sets of joystick axes. Unfortunately, I haven’t been able to figure out which variable is controlled by these pins. Do the variables exist or do I have to program it myself? I am a novice C programmer, so if I do have to program it, where would I begin?
Thanks for your help
Take a look at: http://www.ifirobotics.com/docs/oi-ref-guide-5-8-07.pdf
It names the software variables that correspond to the OI joystick pins.
Thanks for that it solved some problems for me. Unfortunately, it still won’t work. My set up is a 100k ohm slider potentiometer connected to pins 1 and 13. The motor it should control is being controlled by p1_wheel. Nothing happens though, except I get an Aux Fault on the OI when the potentiometer is at 0.
I understand what the Aux Fault is, but not why I am getting it. It works perfectly when used with the standard p1_x and p1_y.
I think that the OIs measure voltage, not resistance. If this is the case (its been a loooooooong time…), you need to connect one end to +5, one end to ground, and the middle pin to the input. This forms a voltage divider.
In the future, you may want to use the Dashboard to check values (if you’re not already).
- Download and install the Dashboard viewer from IFI
- Run the dashboard viewer
- Plug a serial cable into the dashboard port and into your computer.
- Set the COM port in the Dashboard viewer
- Move the jumper on the OI next to the dashboard port from RC to OI
- Make sure that the RC is tethered and on or that the OI is connected to a radio (otherwise, no data is sent)
This will avoid any possible software bugs you may have when testing your hardware.