Joystick HID API for Arduino.
Go to file
2021-11-01 15:24:05 -04:00
examples Add BUTTON_LATCHED_MOMENTARY type, to allow a pushbutton to mimic the behavior of a toggle switch. 2021-11-01 15:24:05 -04:00
Joystick.cpp Add BUTTON_LATCHED_MOMENTARY type, to allow a pushbutton to mimic the behavior of a toggle switch. 2021-11-01 15:24:05 -04:00
Joystick.h Add BUTTON_LATCHED_MOMENTARY type, to allow a pushbutton to mimic the behavior of a toggle switch. 2021-11-01 15:24:05 -04:00
Readme.md Add new behavior for a button that sends separate keypresses on press and release. This required a refactor of the button abstraction as well. 2021-11-01 14:49:53 -04: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.

Dependencies

Installation

  1. Put the arduino-joystick directory into your Arduino libraries directory.
  2. Make sure Bounce2 is installed!

Usage

  1. In your arduino sketch, add the includes: #include <Bounce2.h> #include <Joystick.h>
  2. Create a Joystick object: Joystick joystick;
  3. Add buttons and axes in setup() with Joystick::AddButton(), and call Joystick::Update() in loop(). That's it!