|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||
|
|||
|
Re: Toggle through button?
Depending on what language you're using, and assuming that we're using Java and joystick button 2, the code would look something like:
Code:
if joystick.getButton(2) == true && number < 2 {
number++
} else if joystick.getButton(2) == true && number == 2 {
number = 0
}
Also, this code will use values 0, 1, and 2, rotating each time the button is pressed. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Labview toggle switch | GunfighterJ | NI LabVIEW | 8 | 13-02-2011 18:03 |
| can you use a single button as a toggle? | woogit | General Forum | 1 | 15-02-2008 14:21 |
| toggle switch | Windward | Programming | 31 | 27-01-2006 22:38 |
| Code: Toggle on Tap | Dave Scheck | Programming | 0 | 11-02-2005 18:07 |
| Toggle? | f22flyboy | Programming | 5 | 03-11-2002 08:03 |