|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help on Programming
How do you program a button on the joystick in easy C
|
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||||
|
|||||
|
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 |
|
#4
|
|||
|
|||
|
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?
|
|
#5
|
|||||
|
|||||
|
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 |
|
#6
|
||||
|
||||
|
You need to use the GetOIAnalog RC block for the hat switch.
|
|
#7
|
|||||
|
|||||
|
Re: Help on Programming
Gamer930's answer is almost completely correct. The joystick "hat" switch is actually connected to the WHEEL input.
|
|
#8
|
|||||
|
|||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PLEASE HELP!! Need help programming arm?? | amirjpl | Programming | 12 | 15-03-2007 15:11 |
| HELP-URGENT PROGRAMMING HELP NEEDED | Rohith Surampudi | Lego Mindstorm Discussion | 1 | 24-03-2006 23:05 |
| programming help... | Shlomi32 | Programming | 1 | 08-12-2005 12:28 |
| Programming Help | hedgehogger | Programming | 10 | 19-02-2004 12:11 |
| help programming | aZnXsa1Nt | Robotics Education and Curriculum | 5 | 17-12-2002 15:00 |