This is Arduino code for making a gamepad using an ATmega32U4- based board.
Tested with an Arduino Pro Micro clone, works out of the box with at least PC (and supposedly PS3).
This fork is made primarily for This not-so-slimbox 3d print project, which you should check out ;)
Why this one instead of jfedor2's?
- OOP style: reliable and trivial to extend
- Like the functionality but not the imlementation? Just inherit and override!
- Per-button debouncing with possibility for per-button custom timings
- Just edit respective
DEBOUNCE_BUT_XXX
definitions with whatever timings you want!
- Just edit respective
- S.O.C.D. (Simultanious Opposite Cordinal Directions) cleaning strategies:
TournamentLegal
:- left + right = neutral
- up + down = up
AllNeutral
:- left + right = neutral
- up + down = neutral
None
:- No cleaning
- Possibility to add your own as simple or as complex as you'd like!
- D-pad mode switch to make it act as left stick
- Switching of S.O.C.D. strategy on the fly
- ATmega32U4- based board (mine was a Arduino Pro Micro clone)
- Arduino IDE or Platform.io plugin for VSCode
- For
Arduino IDE
:- rename
main.cpp
intomain.ino
and flash
- rename
- For
Platform.io
:- Open directory using Platform.io plugin and flash
Should compile in about 2 seconds with no errors
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Originally forked from jfedor2/gamepad repo, but departed heavliy from it.