Skip to content

Commit aaaf29a

Browse files
authored
Now in Beta Testing
Update readme to reflect library being moved into BETA testing.
1 parent fed9cd3 commit aaaf29a

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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.
1+
### BETA Testing: This branch is currently being tested. All functions have been implemented and optimized. Feel free to try it out and let me know if you have any issues. The examples are not 100% up-to-date yet.
22

33
# Arduino Joystick Library
4-
#### Version 2.0.0 (in Alpha Testing)
4+
#### Version 2.0.0 (in Beta Testing)
55
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).
66

77
##Installation Instructions
8-
Copy the Joystick folder to the Arduino libraries folder (typically %userprofile%\Documents\Arduino\libraries). The library should now appear in the Arduino IDE list of libraries. The examples should also appear in the examples menu.
8+
Copy the Joystick folder to the Arduino libraries folder (typically `%userprofile%\Documents\Arduino\libraries`). On Microsoft Windows machines, the `deploy.bat` file can be executed to install the Joystick folder (assuming a default Arduino installation). The library should now appear in the Arduino IDE list of libraries. The examples should also appear in the examples menu in the Arduino IDE.
99

1010
##Examples
1111
The following example Arduino sketch files are included in this library:
@@ -22,19 +22,20 @@ The following example Arduino sketch files are included in this library:
2222

2323
#include <Joystick.h>
2424

25+
// Create the Joystick
2526
Joystick_ Joystick;
2627

28+
// Constant that maps the phyical pin to the joystick button.
29+
const int pinToButtonMap = 9;
30+
2731
void setup() {
2832
// Initialize Button Pins
29-
pinMode(9, INPUT_PULLUP);
33+
pinMode(pinToButtonMap, INPUT_PULLUP);
3034

3135
// Initialize Joystick Library
3236
Joystick.begin();
3337
}
3438

35-
// Constant that maps the phyical pin to the joystick button.
36-
const int pinToButtonMap = 9;
37-
3839
// Last state of the button
3940
int lastButtonState = 0;
4041

@@ -151,19 +152,19 @@ Sets the range of values that will be used for the Steering. Default: `0` to `10
151152
Sets the Steering value. See `setSteeringRange` for the range.
152153

153154
###Joystick.setButton(byte button, byte value)
154-
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.
155+
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.
155156

156157
###Joystick.pressButton(byte button)
157-
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.).
158+
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.).
158159

159160
###Joystick.releaseButton(byte button)
160-
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.).
161+
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.).
161162

162163
###Joystick.setHatSwitch(byte hatSwitch, int value)
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+
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.
164165

165166
###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).
167+
Sends the updated joystick state to the host computer. Only needs to be called if `AutoSendState` is `false` (see `Joystick.begin` for more details).
167168

168169
##Testing Details
169170
I have used this library to make an Arduino appear as the following:
@@ -193,4 +194,4 @@ Others have tested this library with the following boards:
193194
- Arduino Due
194195
- SparkFun Pro Micro
195196

196-
(as of 2016-06-09)
197+
(as of 2016-06-20)

0 commit comments

Comments
 (0)