I am new at all this Arduino stuff and I want to build a DIY pc handbrake. I have a micro switch and an Arduino micro.
I have searched all night long for the code that suits my project but nothing.
I am gently asking for a library. Can please someone write it for me or lead me in the right way. I am planning to connect the switch to the pin 2
I have tried this library but that has too many axes and buttons while I need only one button. Link where you can get the example code: https://www.instructables.com/id/Create-a-Joystick-Using-the-Arduino-Joystick-Libra/