Improve documentation a bit.
This commit is contained in:
parent
2c12a848d0
commit
7e24e6afa1
14
Readme.md
14
Readme.md
|
@ -1,6 +1,16 @@
|
||||||
|
# Arduino Joystick library
|
||||||
This is a library that builds and sends USB HID Joystick reports, making it easy to build USB Joysticks with Arduino.
|
This is a library that builds and sends USB HID Joystick reports, making it easy to build USB Joysticks with Arduino.
|
||||||
|
|
||||||
Dependencies:
|
## Dependencies
|
||||||
|
|
||||||
* Your Arduino's USB communication chip be programmed with the arduino-big-joystick firmware (or similar). See <https://github.com/harlequin-tech/arduino-usb> for more info.
|
* Your Arduino's USB communication chip be programmed with the arduino-big-joystick firmware (or similar). See <https://github.com/harlequin-tech/arduino-usb> for more info.
|
||||||
* The Bounce2 library, available at <https://github.com/thomasfredericks/Bounce2>.
|
* The Bounce2 library, available at <https://github.com/thomasfredericks/Bounce2>.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
1. Put the arduino-joystick directory into your Arduino libraries directory.
|
||||||
|
2. Make sure Bounce2 is installed!
|
||||||
|
3. In your arduino sketch, add the includes:
|
||||||
|
#include <Bounce2.h>
|
||||||
|
#include <Joystick.h>
|
||||||
|
4. Create a Joystick object:
|
||||||
|
Joystick joystick;
|
||||||
|
5. Add buttons and axes in setup() with Joystick::AddButton(), and call Joystick::Update() in loop(). That's it!
|
||||||
|
|
Loading…
Reference in New Issue
Block a user