Once upon a time, having a second action button on your gamepad was considered advanced. But today, modern video game controllers have a frankly unreasonable number of buttons — and that’s before bringing the keyboard into PC games. Most of those buttons are used for the standard in-game actions like shooting your gun or picking the pockets of unassuming townspeople. Lately, however, first-person shooters have started to emphasize hiding behind cover. To add a more intuitive way to lean out of that cover, you can build this simple device that attaches to your headset.
The device, dubbed "qeMotion," was designed by Leicester77, who has put together a tutorial explaining how you can make your own. While it can be setup however you like, it’s designed to be attached to something like a pair of headphones. Inside of that attachment is a motion sensor connected to an Arduino. When you tilt your head left or right, that movement is registered by the motion sensor and the Arduino sends the appropriate keypress to your computer. So, for example, if you tip your left, it will send a “Q” keypress to your computer. In video games that feature leaning, that is usually the key for it. You can also configure it for gamepads and other control schemes.
To construct this device, you’ll need an Arduino Pro Micro or Leonardo board. That is important because those boards have a Microchip ATmega32U4 microcontroller that can appear as a standard USB HID device when it’s connected to your computer. The motion sensor is a MPU-6050 on a breakout board. You’ll want to 3D print two enclosures: one for the main unit with the Arduino inside and one for the smaller unit which houses the IMU and attaches to your headphones. The code has different modes available, but you’ll most likely want to use the standard leaning configuration. You can, however, set up other motion-controlled keypresses to help with your gameplay outside of cover-heavy shooters.