Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Help on Programming (http://www.chiefdelphi.com/forums/showthread.php?t=61747)

iwin2000 15-01-2008 16:46

Help on Programming
 
How do you program a button on the joystick in easy C

SgtMillhouse648 15-01-2008 17:22

Re: Help on Programming
 
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

Re: Help on Programming
 
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

Re: Help on Programming
 
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

Re: Help on Programming
 
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

Re: Help on Programming
 
You need to use the GetOIAnalog RC block for the hat switch.

Alan Anderson 16-01-2008 22:45

Re: Help on Programming
 
Quote:

Originally Posted by nandu10 (Post 679400)
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

Re: Help on Programming
 
This post 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.


All times are GMT -5. The time now is 23:22.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi