Base USB HID controller sketches for Arduino Leonardo compatible boards using the Arduino Joystick Library, for electric, hybrid, diesel, and steam simulation controls.
This repository contains simple working example firmware for Arduino Leonardo compatible boards using the MHeironimus Arduino Joystick Library.
Each sketch is intended to serve as a base that builders can modify for their own projects. The examples use common analog inputs for potentiometers and common digital inputs for buttons and switches.
These sketches are meant to be a starting point. Pin assignments, axis behavior, button counts, switch logic, and hardware layout may be customized by the end user.
- 1 analog axis
- Example digital button inputs
- 2 analog axes
- Example digital button inputs
- 3 analog axes
- Example digital button inputs
- 4 analog axes
- Example digital button inputs
These example sketches are designed for:
- Arduino Leonardo compatible boards
- ATmega32U4 based USB-capable boards with Leonardo compatibility
These sketches use the MHeironimus Arduino Joystick Library.
- Analog inputs: A0, A1, A2, A3
- Digital button inputs: common digital pins such as 2 through 11 depending on sketch
Buttons are configured using INPUT_PULLUP, so each button is considered pressed when the pin is pulled to ground.
This repository is intended to provide open working reference firmware for USB HID simulation controller projects. These examples are deliberately simple so they can be understood, tested, and expanded easily.
MIT