You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
-
### WARNING: This branch is currently in development and is not stable at this time.
1
+
### ALPHA Testing: This branch is currently in development. All functions have been implemented, but not optimized at this time. Feel free to try it out and let me know if you have any issues. The examples are not 100% up-to-date yet.
2
2
3
3
# Arduino Joystick Library
4
-
#### Version 2.0.0 (in development)
4
+
#### Version 2.0.0 (in Alpha Testing)
5
5
This library can be used with Arduino IDE 1.6.6 (or above) to add one or more joysticks (or gamepads) to the list of HID devices an Arduino Leonardo or Arduino Micro (or any Arduino clone that is based on the ATmega32u4) can support. This will not work with Arduino IDE 1.6.5 (or below).
6
6
7
7
##Installation Instructions
@@ -10,13 +10,13 @@ Copy the Joystick folder to the Arduino libraries folder (typically %userprofile
10
10
##Examples
11
11
The following example Arduino sketch files are included in this library:
12
12
13
-
- JoystickTest - Simple test of the Joystick library. Exercises many of the Joystick library functions when pin A0 is grounded.
14
-
- MultipleJoystickTest - Creates 4 Joysticks using the library and exercises the first 16 buttons and X and Y axis when pin A0 is grounded.
15
-
- JoystickButton - Creates a Joystick and maps pin 9 to button 0, pin 10 to button 1, pin 11 to button 2, and pin 12 to button 3.
16
-
- JoystickKeyboard - Creates a Joystick and a Keyboard. Maps pin 9 to Joystick Button 0, pin 10 to Joystick Button 1, pin 11 to Keyboard key 1, and pin 12 to Keyboard key 2.
17
-
- DrivingControllerTest - Creates a Driving Controller and tests 4 buttons, the Steering, Brake, and Accelerator when pin A0 is grounded.
18
-
- FlightControllerTest - Creates a Flight Controller and tests 32 buttons, the X and Y axis, the Throttle, and the Rudder when pin A0 is grounded.
19
-
- HatSwitchTest - Creates a joystick with two hat switches. Grounding pins 4 - 11 cause the hat switches to change position.
13
+
-`JoystickTest` - Simple test of the Joystick library. Exercises many of the Joystick library functions when pin A0 is grounded.
14
+
-`MultipleJoystickTest` - Creates 4 Joysticks using the library and exercises the first 16 buttons and X and Y axis when pin A0 is grounded.
15
+
-`JoystickButton` - Creates a Joystick and maps pin 9 to button 0, pin 10 to button 1, pin 11 to button 2, and pin 12 to button 3.
16
+
-`JoystickKeyboard` - Creates a Joystick and a Keyboard. Maps pin 9 to Joystick Button 0, pin 10 to Joystick Button 1, pin 11 to Keyboard key 1, and pin 12 to Keyboard key 2.
17
+
-`DrivingControllerTest` - Creates a Driving Controller and tests 4 buttons, the Steering, Brake, and Accelerator when pin A0 is grounded.
18
+
-`FlightControllerTest` - Creates a Flight Controller and tests 32 buttons, the X and Y axis, the Throttle, and the Rudder when pin A0 is grounded.
19
+
-`HatSwitchTest` - Creates a joystick with two hat switches. Grounding pins 4 - 11 cause the hat switches to change position.
20
20
21
21
###Simple example
22
22
@@ -79,7 +79,7 @@ The following constants define the default values for the constructor parameter'
79
79
-`JOYSTICK_DEFAULT_HATSWITCH_COUNT` is set to `2`
80
80
81
81
### Joystick.begin(bool initAutoSendState)
82
-
Starts emulating a game controller connected to a computer. By default all methods update the game controller state immediately. If initAutoSendState is set to false, the Joystick.sendState method must be called to update the game controller state.
82
+
Starts emulating a game controller connected to a computer. By default all methods update the game controller state immediately. If `initAutoSendState` is set to `false`, the `Joystick.sendState` method must be called to update the game controller state.
83
83
84
84
### Joystick.end()
85
85
Stops the game controller emulation to a connected computer.
@@ -163,7 +163,7 @@ Release the indicated button (range: `0` - (`buttonCount - 1`)). The button is t
163
163
Sets the value of the specified hat switch. The hatSwitch is 0-based (i.e. hat switch #1 is 0 and hat switch #2 is 1). The value is from 0° to 360°, but in 45° increments. Any value less than 45° will be rounded down (i.e. 44° is rounded down to 0°, 89° is rounded down to 45°, etc.). Set the value to -1 to release the hat switch.
164
164
165
165
###Joystick.sendState()
166
-
Sends the updated joystick state to the host computer. Only needs to be called if AutoSendState is false (see Joystick.begin for more details).
166
+
Sends the updated joystick state to the host computer. Only needs to be called if `AutoSendState` is false (see `Joystick.begin` for more details).
167
167
168
168
##Testing Details
169
169
I have used this library to make an Arduino appear as the following:
@@ -193,4 +193,4 @@ Others have tested this library with the following boards:
0 commit comments