Skip to content

Commit fa35af1

Browse files
authored
Update markdown
Update markdown to support GitHub markdown viewer update
1 parent 383148a commit fa35af1

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,88 +5,88 @@ Arduino IDE 1.6.6 (or above) library that adds a joystick to the list of HID dev
55

66
The lastest version of this library can be found at [https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-2.0](https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-2.0).
77

8-
##Support for one, two, or three joysticks
8+
## Support for one, two, or three joysticks
99
This library comes in three flavors:
1010
- Joystick - adds a single joystick that contains an X, Y, and Z axis (including rotation), 32 buttons, 2 hat switches, a throttle, and a rudder.
1111
- Joystick2 - adds two simple joysticks that contain an X and Y axis and 16 buttons.
1212
- Joystick3 - adds three simple joysticks that contain an X and Y axis and 16 buttons.
1313

14-
##Installation Instructions
14+
## Installation Instructions
1515
Copy one or more of the folders (Joystick, Joystick2, and Joystick3) to the Arduino libraries folder (typically %userprofile%\Documents\Arduino\libraries). The library (or libraries) should now appear in the Arduino IDE list of libraries.
1616

17-
##Joystick Library API
17+
## Joystick Library API
1818
The following API is available if the Joystick library in included in a sketch file.
1919

20-
###Joystick.begin(bool initAutoSendState)
20+
### Joystick.begin(bool initAutoSendState)
2121
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.
2222

23-
###Joystick.end()
23+
### Joystick.end()
2424
Stops the game controller emulation to a connected computer.
2525

26-
###Joystick.setXAxis(byte value)
26+
### Joystick.setXAxis(byte value)
2727
Sets the X axis value. Range -127 to 127 (0 is center).
2828

29-
###Joystick.setYAxis(byte value)
29+
### Joystick.setYAxis(byte value)
3030
Sets the Y axis value. Range -127 to 127 (0 is center).
3131

32-
###Joystick.setZAxis(byte value)
32+
### Joystick.setZAxis(byte value)
3333
Sets the Z axis value. Range -127 to 127 (0 is center).
3434

35-
###Joystick.setXAxisRotation(int value)
35+
### Joystick.setXAxisRotation(int value)
3636
Sets the X axis rotation value. Range 0° to 360°.
3737

38-
###Joystick.setYAxisRotation(int value)
38+
### Joystick.setYAxisRotation(int value)
3939
Sets the Y axis rotation value. Range 0° to 360°.
4040

41-
###Joystick.setZAxisRotation(int value)
41+
### Joystick.setZAxisRotation(int value)
4242
Sets the Z axis rotation value. Range 0° to 360°.
4343

44-
###Joystick.setButton(byte button, byte value)
44+
### Joystick.setButton(byte button, byte value)
4545
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.
4646

47-
###Joystick.pressButton(byte button)
47+
### Joystick.pressButton(byte button)
4848
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.).
4949

50-
###Joystick.releaseButton(byte button)
50+
### Joystick.releaseButton(byte button)
5151
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.).
5252

53-
###Joystick.setThrottle(byte value)
53+
### Joystick.setThrottle(byte value)
5454
Sets the throttle value. Range 0 to 255.
5555

56-
###Joystick.setRudder(byte value)
56+
### Joystick.setRudder(byte value)
5757
Sets the rudder value. Range 0 to 255.
5858

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

62-
###Joystick.sendState()
62+
### Joystick.sendState()
6363
Sends the updated joystick state to the host computer. Only needs to be called if AutoSendState is false (see Joystick.begin for more details).
6464

65-
##Joystick2 and Joystick3 Library API
65+
## Joystick2 and Joystick3 Library API
6666
The following API is available if the Joystick2 or Joystick3 library in included in a sketch file.
6767

6868
The joystickIndex is 0-based (i.e. the first game controller has a joystickIndex of 0, the second has a joystickIndex of 1, and the third has a joystickIndex of 2).
6969

70-
###Joystick[joystickIndex].begin(bool initAutoSendState)
70+
### Joystick[joystickIndex].begin(bool initAutoSendState)
7171
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[joystickIndex].sendState method must be called to update the game controller state.
7272

73-
###Joystick[joystickIndex].end()
73+
### Joystick[joystickIndex].end()
7474
Stops the game controller emulation to a connected computer.
7575

76-
###Joystick[joystickIndex].setXAxis(byte value)
76+
### Joystick[joystickIndex].setXAxis(byte value)
7777
Sets the X axis value. Range -127 to 127 (0 is center).
7878

79-
###Joystick[joystickIndex].setYAxis(byte value)
79+
### Joystick[joystickIndex].setYAxis(byte value)
8080
Sets the Y axis value. Range -127 to 127 (0 is center).
8181

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

85-
###Joystick[joystickIndex].pressButton(byte button)
85+
### Joystick[joystickIndex].pressButton(byte button)
8686
Press the indicated button (0 - 15). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
8787

88-
###Joystick[joystickIndex].releaseButton(byte button)
88+
### Joystick[joystickIndex].releaseButton(byte button)
8989
Release the indicated button (0 - 15). The button is the 0-based button number (i.e. button #1 is 0, button #2 is 1, etc.).
9090

91-
###Joystick[joystickIndex].sendState()
91+
### Joystick[joystickIndex].sendState()
9292
Sends the updated joystick state to the host computer. Only needs to be called if AutoSendState is false (see Joystick[joystickIndex].begin for more details).

0 commit comments

Comments
 (0)