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
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,13 +81,13 @@ Sets the Y axis rotation value. Range 0° to 360°.
81
81
Sets the Z axis rotation value. Range 0° to 360°.
82
82
83
83
###Joystick.setButton(byte button, byte value)
84
-
Sets the state (0 or 1) of the specified button (range: 0 - (buttonCount - 1)). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.). The value is 1 if the button is pressed and 0 if the button is released.
84
+
Sets the state (`0` or `1`) of the specified button (range: `0` - (`buttonCount - 1`)). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.). The value is 1 if the button is pressed and 0 if the button is released.
85
85
86
86
###Joystick.pressButton(byte button)
87
-
Press the indicated button (range: 0 - (buttonCount - 1)). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
87
+
Press the indicated button (range: `0` - (`buttonCount - 1`)). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
88
88
89
89
###Joystick.releaseButton(byte button)
90
-
Release the indicated button (range: 0 - (buttonCount - 1)). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
90
+
Release the indicated button (range: `0` - (`buttonCount - 1`)). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
91
91
92
92
###Joystick.setThrottle(byte value)
93
93
Sets the throttle value. Range 0 to 255.
@@ -102,7 +102,12 @@ Sets the value of the specified hat switch. The hatSwitch is 0-based (i.e. hat s
102
102
Sends the updated joystick state to the host computer. Only needs to be called if AutoSendState is false (see Joystick.begin for more details).
103
103
104
104
##Testing Details
105
-
I used this library to make an Arduino appear as 1, 2, 3, and 4 joysticks / gamepads.
105
+
I have used this library to make an Arduino appear as the following:
106
+
107
+
- 1 joystick / gamepad
108
+
- 2 joysticks / gamepads
109
+
- 3 joysticks / gamepads
110
+
- 4 joysticks / gamepads
106
111
107
112
I have tested with 1 - 32 buttons.
108
113
@@ -117,4 +122,4 @@ I have tested this library with the following boards:
0 commit comments