Using a Nerf Hammershot and an Arduino, I built my own custom video game controller for the character of McCree in Overwatch.

Overview

The Arduino inside of the Nerf gun acts as a mouse and keyboard, sending HID commands over USB to the computer. The trigger and hammer are wired to buttons, and the cylinder is wired to a rotary encoder. Pulling the trigger fires, sliding the hammer back “fans the hammer”, and spinning the cylinder reloads. The gun also includes an inertial measurement unit (IMU) with an accelerometer and a gyroscope. This allows me to track movement for aiming. McCree’s ultimate and flashbang are also controlled by the IMU by pointing the gun down or twisting my arm, respectively.

To keep things minimal and within the one-handed style of the game, the controller includes no movement controls (move, jump, roll). I designed it to be paired with a DDR-style dance pad to handle movement, although I did end up switching that out for a Wii Nunchuk suspended from my belt. The game sees the gun as a system peripheral and is none-the-wiser, meaning that there is little risk of triggering anti-cheat protections.

I was inspired by a number of streamers on Twitch who build their own wacky controllers for playing games, notably Rudeism and SuperYoshi64 (formerly ATwerkinYoshi). They call this style of playing games with strange methods “AltCtrl”. If you like this project, I recommend checking them out.

Video

Here’s a short video that shows how the controller works. Enjoy!

Posts

Related Posts

How to Use a Wii Nunchuk with an Arduino

Software Download

I’ve created a repository on GitHub for the project files. This repository contains the final Arduino code for the Nerf controller and Nunchuk, the few 3D printed designs I used, and the rough PCB design. Click here.

Parts List

For full disclosure, note that most of these are Amazon affiliate links that help fund the content on this site. Thank you for your support!

Those are the key parts that are absolutely necessary for the build. I tried to make this controller using only things I had on-hand, so there’s a lot of supplies that I used which wouldn’t be economical (or even practical!) to buy specifically for this project and thus aren’t listed.

For the sake of completeness, other parts and supplies are linked in the posts as they are used. If I missed something, feel free to leave a comment.


1 Comment

fabio · February 7, 2021 at 11:46 am

Hi
the Nerf Hammershot is awesome !!!
I wanted to ask you if it is possible to see the prototype, mpu6050, arduino micro and 2 buttons, it works like a mouse, I would like to build a gun to play house of the dead on sega model 2

let me know ,
good day

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Would you like to know more?