|
2 | 2 | // to create multiple Joystick objects on a single Arduino
|
3 | 3 | // Leonardo or Arduino Micro.
|
4 | 4 | //
|
| 5 | +// Each joystick has a unique configuration. |
| 6 | +// |
5 | 7 | // Matthew Heironimus
|
6 | 8 | // 2016-05-13
|
7 | 9 | //------------------------------------------------------------
|
|
10 | 12 | #define JOYSTICK_COUNT 4
|
11 | 13 |
|
12 | 14 | Joystick_ Joystick[JOYSTICK_COUNT] = {
|
13 |
| - Joystick_(0x03, 4, true, true, false, false, false, false), |
14 |
| - Joystick_(0x04, 8, true, true, true, true, false, false), |
15 |
| - Joystick_(0x05, 16, false, true, false, true, false, false), |
16 |
| - Joystick_(0x06, 32) |
| 15 | + Joystick_(0x03, 4, 2, true, true, false, false, false, false, false, false, false, false, false), |
| 16 | + Joystick_(0x04, 8, 1, true, true, true, true, false, false, false, false, false, false, false), |
| 17 | + Joystick_(0x05, 16, 0, false, true, false, true, false, false, true, true, false, false, false), |
| 18 | + Joystick_(0x06, 32, 1, true, true, false, true, true, false, false, false, true, true, true) |
17 | 19 | };
|
18 | 20 |
|
19 | 21 | // Set to true to test "Auto Send" mode or false to test "Manual Send" mode.
|
@@ -98,13 +100,6 @@ void testXYAxis(int joystickId, unsigned int currentStep)
|
98 | 100 |
|
99 | 101 | void setup() {
|
100 | 102 |
|
101 |
| -/* Uncomment this out for debugging... |
102 |
| - Serial.begin(9600); |
103 |
| - while (!Serial) { |
104 |
| - ; // wait for serial port to connect. Needed for native USB |
105 |
| - } |
106 |
| -*/ |
107 |
| - |
108 | 103 | for (int index = 0; index < JOYSTICK_COUNT; index++)
|
109 | 104 | {
|
110 | 105 | Joystick[index].setXAxisRange(-127, 127);
|
|
0 commit comments