2015-11-13 05:57:57 +00:00
# Arduino Joystick library
2015-11-13 05:45:38 +00:00
This is a library that builds and sends USB HID Joystick reports, making it easy to build USB Joysticks with Arduino.
2015-11-05 03:02:09 +00:00
2015-11-13 05:57:57 +00:00
## Dependencies
2021-11-01 18:49:53 +00:00
* Your Arduino's USB communication chip must be programmed with the arduino-big-joystick firmware (or similar). See < https: // github . com / harlequin-tech / arduino-usb > for more info.
2015-11-13 05:45:38 +00:00
* The Bounce2 library, available at < https: // github . com / thomasfredericks / Bounce2 > .
2015-11-13 05:57:57 +00:00
## Installation
1. Put the arduino-joystick directory into your Arduino libraries directory.
2. Make sure Bounce2 is installed!
2015-11-13 05:58:24 +00:00
## Usage
1. In your arduino sketch, add the includes:
2015-11-13 05:57:57 +00:00
#include < Bounce2.h >
#include < Joystick.h >
2015-11-13 05:58:24 +00:00
2. Create a Joystick object:
2015-11-13 05:57:57 +00:00
Joystick joystick;
2015-11-13 05:58:24 +00:00
3. Add buttons and axes in setup() with Joystick::AddButton(), and call Joystick::Update() in loop(). That's it!