Unlike the previous version, this one is powered by the Joystick library, which turns this professional microcontroller into a full-fledged gamepad controller.
This controller can also run retro games like doom and donkey kong.
Tools & Materials:
-Buttons for joystick; -Arduino Pro Micro; -Tactile buttons; -Pin connectors; -Soldering accessories; -Drill; Step one: custom board
The previous joystick he made was completely homemade. The board for the joystick was made by myself.
The controller did work, but it had many shortcomings, for example, the response time was poor and its code was not based on the joystick library. In addition, the controller had buttons and no joysticks.
To improve the previous setting, he prepared a PCB that looked like the old design + joystick buttons and the board was made with professional equipment.
Files for making the board can be download below.
Step two: assembly printed circuit board
The assembly process of this board is quite simple, there are no SMD components on this board, which makes it easy to assemble. But in the design process, several mistakes were made. The wizard forgot to add the joystick mounting holes. I just had to drill the holes by hand with a 1.5 mm drill.
Also, another mistake he made was the joystick switch was designed upside down. The cure is the same, drill holes for the button in the normal position.
Step Three: Code
After installation, you need to upload the code to Arduino Pro Micro.
Open the attached sketch file.
Download and install the library here: https://github.com/gamelaster/ArduinoGamepad/tree/master/examples
Connect your controller to your computer
Choose the right board – Arduino pro micro
Select the correct com-port and click “Load”.
After that you need to open the devices and there should be an Arduino micro with a gamepad icon.
Click on it, open its properties. The properties will show the location of the gamepad buttons.
Step four: testing
Testing consists in checking the functionality of the buttons. When you press the buttons or change the position of the joystick, each action should be displayed on the screen.
To play, you need to connect the joystick to your computer and start the game. Set the necessary keys in the game settings.
expand the project and install the esp32 module on the board. Installing this module will make the controller wireless.
The whole process of making and testing the controller can be viewed on the video.