Saturday, July 09, 2022

Simple Arduino Leonardo USB Game Pad

Parts

Required Parts

Optional Parts

Hardware Assembly

  1. If using a case, place the Arduino Leonardo inside the case per the instructions provided with the case.
  2. Insert the Funduino Joystick Shield onto the Arduino Leonardo.

Software

  1. Download the latest v2 version of the Arduino Joystick Library from https://github.com/MHeironimus/ArduinoJoystickLibrary: https://github.com/MHeironimus/ArduinoJoystickLibrary/archive/refs/heads/version-2.0.zip.
  2. To install the library in the Arduino IDE, select Sketch > Include Library > Add .ZIP Library.... Browse to where the downloaded ZIP file is located and click Open. The Joystick library's examples will now appear under File > Examples > Joystick.
  3. Open the Funduino Joystick Shield example by selecting File > Examples > Joystick > FunduinoJoystickShield. Verify the correct Port is selected in the Arduino IDE and select Upload.
  4. On Microsoft Windows, the joystick can be tested using the “Game Controllers” dialog.