MHeironimus / ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
GNU Lesser General Public License v3.0
2.1k stars 409 forks source link

Wire connection to Leonardo #146

Closed CryptoAngel closed 4 years ago

CryptoAngel commented 4 years ago

Hello, Can you upload here how to connect wire/legs for Leonardo Axes X,Y,Z, Hat and as many button as possible? By the way, is this the latest version? Thx!

MHeironimus commented 4 years ago

As I write this version 2.0.5 is the latest, fully tested version. There are some other versions out there, but I have not finished testing them yet.

There are various examples out on the internet of how to create a joystick using this library (which wires one uses is really up to you). Here are some examples:

CryptoAngel commented 4 years ago

Thank you. Last question I cloud not find answer, with Leonardo I am not suppose to flash the eprom to make seems as joystick as it require on Arduino Uno, right?

MHeironimus commented 4 years ago

Correct. You do not need to flash the EPROM on an Arduino Leonardo to make it look like a joystick. You only need to upload the program you have written that uses the library.

CryptoAngel commented 4 years ago

Dear Matthew, I am still struggling with it, I could not find a sketch for Leonardo legs connecting 32 buttons and 2 hat switches and 3 potentiometers for the Flight Joystick. Can you please help? Also, I want to use 2 motors as force back - can I do this with Arduino?

MHeironimus commented 4 years ago

In order to get that many inputs using a standard Arduino, you will have to add some additional circuitry to your design.

I could not find a sketch for Leonardo legs connecting 32 buttons

See the Buttons section in the FAQ (https://github.com/MHeironimus/ArduinoJoystickLibrary/wiki/FAQ#buttons) for more details.

2 hat switches

Wiring up a hat switch should be similar to the example shown at https://www.instructables.com/id/Create-a-Joystick-Using-the-Arduino-Joystick-Libra/.

3 potentiometers

See the following Arduino tutorial on reading potentiometers : https://www.arduino.cc/en/Tutorial/Potentiometer

Also, I want to use 2 motors as force back - can I do this with Arduino?

This has been previously requested. See #9 This has not been implemented yet, to my knowledge.