![]() |
|
#15
|
||||
|
||||
|
Sorted
void setup() { pinMode(0, INPUT_PULLUP); pinMode(1, INPUT_PULLUP); pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); } void loop() { // read the digital inputs and set the buttons Joystick.button(1, digitalRead(0) == LOW); Joystick.button(2, digitalRead(1) == LOW); Joystick.button(3, digitalRead(2) == LOW); Joystick.button(4, digitalRead(3) == LOW); // a brief delay, so this runs 20 times per second delay(50); }
__________________
![]() Gigabyte X58A-UD5 | Intel i7 930 | Corsair H70 | ATI 5970 | 6GB Kingston DDR3 | Intel 160GB G2 | Win 7 Ultimate 64 Bit |
MONITOR: Acer S243HL. CASE: Thermaltake LEVEL 10. INPUTS: KG13 Warthog, Saitek Pedals, Track IR 4. |
|
|