![]() |
custom control programming question...
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 |
Re: custom control programming question...
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. |
Re: custom control programming question...
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. |
Re: custom control programming question...
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.
good luck! |
Re: custom control programming question...
In the future, you may want to use the Dashboard to check values (if you're not already).
This will avoid any possible software bugs you may have when testing your hardware. |
| All times are GMT -5. The time now is 00:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi