Hi how can I make a controller with 12 buttons and two joysticks with the gamelaster library ArduinoGamepad?
Use a 3D printer?
Do you have google on your internets over there? Seems like plenty of people have done what you retrying to do…
Only some types of Arduino can do this. Uno, Mega and Pro Mini cannot, for example. Leonardo, Micro and Pro Micro can.
For 2 joysticks you need 4 analog inputs. Most Arduino have more than that.
For 12 buttons you need only 7 digital pins, if you wire your buttons as a 3x4 matrix. With a matrix, if you need to press more than one button at the same time, or if any of the buttons are toggle switches, then you will need a small diode in series with each button. 1n4148 is ok for the diodes.
Actually, I have 16 buttons controlled by 1 analog pin using a voltage divider network with 1% resistors. It works well.
...as long as you don't need to press more than one button at once.
Why would I need to press multiple buttons at the same time when I have that many to work with? It would seem smarter to me to simply use another analog pin and bank of switches.
I am not much of a gamer but I imagine it all depends on the game(s) and how they are played. In your case, you don't seem to need the ability to press more than one at once. But I know there are some games where multiple buttons need to be pressed at the same time to achieve some particular move or action. We have no idea if that's true for @stromecek_555 or not, we don't know what games the controller will be used for. My comment was not meant as a criticism of your suggestion, just a warning to @stromecek_555 that it might not be what they need.
The Arduino library source on github includes examples. The README includes a link to a step-by-step tutorial.
No problem. IT just that most games are written for a PC; most microcontrollers probably aren't up to the type of games that gamers seem to play.
They can be, no problem. Because we are talking about the microcontroller as the game controller, not running the game itself.