Log in

View Full Version : Help on Programming


iwin2000
15-01-2008, 16:46
How do you program a button on the joystick in easy C

SgtMillhouse648
15-01-2008, 17:22
If I'm remembering right, under the input section, there should be something about OI input or something like that. It should have an option for the switches from the joystick. You should then be able to then retrieve that switch (digital input) to a variable and do what ever you want with it then.
Good Luck
Malhon

JBotAlan
15-01-2008, 17:24
In the left window, under "RC Control", there's a "Digital OI Input" block. Let me know if you need more help than that.

JBot

nandu10
16-01-2008, 15:29
On the Digital Output/Input window there are only 4 choices for buttons on the joystick: trigger, aux1, aux2, and thumb. But on the joystick there is a big button between the aux1 and aux2. What is that button called? Where do you program that button in easyc?

Gamer930
16-01-2008, 16:03
I believe this uses p#_aux input. How they do this is they have a different resistor on each of the switch positions and this will cause the number to be slightly different on the Analog Input.

What I would do is do a Print to Screen and move the switch around to see the number changes.

I can post back when I get a chance to test it tonight. Until then I would try doing different print screens of all the values

Kingofl337
16-01-2008, 18:02
You need to use the GetOIAnalog RC block for the hat switch.

Alan Anderson
16-01-2008, 22:45
On the Digital Output/Input window there are only 4 choices for buttons on the joystick: trigger, aux1, aux2, and thumb. But on the joystick there is a big button between the aux1 and aux2. What is that button called? Where do you program that button in easyc?

Gamer930's answer is almost completely correct. The joystick "hat" switch is actually connected to the WHEEL input.

The Lucas
16-01-2008, 22:57
This post (http://www.chiefdelphi.com/forums/showpost.php?p=652939&postcount=4) should give you some idea what values the hat switch returns. I wouldn't use it for anything that needs fine control (like drive) but more like a few (4) buttons like the poster suggests.