Skip to content

Commit 6121481

Browse files
committed
More button related help updates
1 parent 14384d4 commit 6121481

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ The following API is available if the Joystick library in included in a sketch f
5151
###Joystick\_.Joystick\_(...)
5252
Constructor used to initialize and setup the Joystick. The following optional parameters are available:
5353

54-
- uint8\_t hidReportId - Default: 0x03 - Indicates what the joystick's HID report ID should be. This value must be unique if you are creating multiple instances of Joystick. Do not use 0x01 or 0x02 as they are used by the built-in Arduino Keyboard and Mouse libraries.
55-
- uint8\_t buttonCount - Default: 32 - Indicates how many buttons will be available on the joystick.
54+
- `uint8_t hidReportId` - Default: `0x03` - Indicates what the joystick's HID report ID should be. This value must be unique if you are creating multiple instances of Joystick. Do not use `0x01` or `0x02` as they are used by the built-in Arduino Keyboard and Mouse libraries.
55+
- `uint8_t buttonCount` - Default: `32` - Indicates how many buttons will be available on the joystick.
5656

5757
###Joystick.begin(bool initAutoSendState)
5858
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.
@@ -79,13 +79,13 @@ Sets the Y axis rotation value. Range 0° to 360°.
7979
Sets the Z axis rotation value. Range 0° to 360°.
8080

8181
###Joystick.setButton(byte button, byte value)
82-
Sets the state (0 or 1) of the specified button (0 - 31). 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.
82+
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.
8383

8484
###Joystick.pressButton(byte button)
85-
Press the indicated button (0 - 31). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
85+
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.).
8686

8787
###Joystick.releaseButton(byte button)
88-
Release the indicated button (0 - 31). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
88+
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.).
8989

9090
###Joystick.setThrottle(byte value)
9191
Sets the throttle value. Range 0 to 255.
@@ -100,7 +100,8 @@ Sets the value of the specified hat switch. The hatSwitch is 0-based (i.e. hat s
100100
Sends the updated joystick state to the host computer. Only needs to be called if AutoSendState is false (see Joystick.begin for more details).
101101

102102
##Testing Details
103-
I used this library to make an Arduino appear as 1, 2, 3, and 4 joysticks / gamepads.
103+
I used this library to make an Arduino appear as 1, 2, 3, and 4 joysticks / gamepads.
104+
I have tested with 1 - 32 buttons.
104105

105106
I have tested this library using the following Arduino IDE Versions:
106107

@@ -113,4 +114,4 @@ I have tested this library with the following boards:
113114
- Arduino Leonardo
114115
- Arduino Micro
115116

116-
(as of 2016-05-13)
117+
(as of 2016-05-20)

0 commit comments

Comments
 (0)