Blog Home

A compact DIY controller for gaming or robotics

Arduino TeamApril 14th, 2022

Some of the best projects are the ones that take an already-existing product and recreate it from the ground up using easily accessible components. Jithin Sanal set out to do just this by designing and building a USB controller that can be used for a variety of tasks.

The joystick is based around the Nano RP2040 Connect, which means that it not only contains a powerful dual-core Arm microcontroller, but also an accelerometer, gyroscope, an RGB LED, and a microphone. The ample amounts of memory and flash can enable small machine learning models to run as well for more advanced processing of motion/input data. Apart from the Arduino, the controller houses a pair of potentiometers, a two-axis joystick, and four buttons that act similar to a D-pad.

After laying out the components in CAD and designing a PCB, Sanal was able to have it fabricated and then proceeded to solder it all together. The code driving everything polls each component to check if it’s active, in the case of a button, or its current analog value, in the case of a potentiometer. If a threshold is crossed, the Nano RP2040 Connect outputs the corresponding keypress over USB. 

To see more about this project, you can read Sanal’s excellent project write-up here on Hackster.io.

Categories:Arduino