Play Call of Duty with a Raspberry Pi-powered Nerf gun
YouTuber Alfredo Sequeida turned a Nerf gun into a controller for playing Call of Duty: Warzone. This is a fun-looking modification project, but some serious coding went into the process.
Trigger happy
Funnily enough, the Nerf gun that Alfredo chose was a special edition Fortnite model. This irked him as a Call of Duty player, but this model had the most potential to accommodate the modifications he knew he wanted.

The controller uses the Nerf gun’s original trigger. Alfredo designed extra 3D-printed buttons (white dots on the far right) to let him perform more in-game actions like moving, plating, and jumping.
Software
A Raspberry Pi 4 powers the whole thing, running Python scripts Alfredo wrote for both the Raspberry Pi and his gaming PC. Here’s all the code on GitHub.
Gameplay movement is controlled by getting accelerometer data via the command-line tool ADB logcat from an old Nexus 5 Android phone that’s mounted on the Nerf gun. The data is logged using a custom app Alfredo made on Android Studio.

Part of the action
The controller’s design makes players feel part of the action as their Call of Duty operator scouts around locations. It’s a much more immersive experience than holding an ordinary game controller in your lap or tapping away at a PC keyboard. Alfredo even plays standing up now his NERF gun controller is in action. He might as well be on a real life Special Ops mission.

More Call of Duty mod ideas…
So what’s next, Alfredo? We vote you make some modded night vision googles out of an old Viewmaster toy. That’ll totally work, right?

5 comments
David
Even the person in the Viewmaster photo may be unfamiliar with the device – they appear to be holding it backwards, trying to look into the wrong end! I think my parents or grandparents had one. I have a misty recollection of looking through one as a kid. It was almost magic!
CheezeBeard, The Lunchroom Pirate
i had one of those when i was younger. had a lot of fun with them, too. and yes, the person in the picture IS holding it the wrong way around.
Alfredo Sequeida
Great post! And you’re right, I had to look up what a Viewmaster toy is! Night vision goggles does sound like an interesting project 🤔.
Darrian Miller
Great work!
Joe
Cool project! You will need 2 accelerometers to get that third axis for proper 3d spatial recognition of the nerf gun.
Comments are closed