arduino-joystick/Readme.md

19 lines
824 B
Markdown
Raw Normal View History

2015-11-13 05:57:57 +00:00
# Arduino Joystick library
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
* 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.
* 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!