Note: you need an Arduino Leonardo, Arduino Micro or any Arduino clone that is based on ATmega32u4 to use this code.
After installing and setting up Git Bash and Arduino IDE, We are ready to upload our code to our arduino.
-
First we have to install a library which will do all the data transmission work in the background, see this link for instructions.
-
When you're done with installing the library, go to the directory which you want to clone in and clone the repository with the following command.
$ git clone https://github.com/Scorpions-Robotics/Leonardo-Joystick
- Open the buttons.ino file on the Arduino IDE.
- Configure analogConstants variable according to the pins you need.
- Go to tools section from menu and choose the correct board and port.
- Click the upload button and good job, you did it!
You can see some other examples for the library at this repository.
If you're facing with any kind of problem, feel free to open an issue. Good luck!