While gaming controllers have been manufactured in one form or another for the last 40 years or so, what if you’d like to make your own? For a comprehensive guide on how to do so from “scratch” using an Arduino Pro Micro, or the larger Leonardo, be sure to check out this video by Benjijart.
The video starts out with an outline of some of the components that you’ll need to use. This, of course, includes buttons, and Benjijart notes that you don’t have to use a resistor to pull your buttons to a known state when off if you use “INPUT_PULLUP” in your code. Analog joysticks are also discussed, noting that they use a pair of Arduino analog inputs to take in x and y potentiometer values, as well as a second input for the button itself. All of this is tied together using the Arduino Joystick Library available on GitHub by Mheironimus. It features quite a bit of functionality that you may or may not need in your build.
Another useful tip from the video is that you can set up your custom device on Windows, by searching for “Set up USB game controllers,” and that Steam can help you adapt things for games that don’t have native support. While you may know much of this info, and could fill in the blanks with a little searching, when you’re actually ready to build something, this video could be a great resource.