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.

Head to the 13-minute mark for an in-game demonstration

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.

mini screen embedded on nerf gun
The screen is an old Android phone which lends its accelerometer to the project

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.

raspberry pi embedded in nerf gun
A Raspberry Pi 4 wired up to all the buttons on the other side of the Nerf gun

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.

call of duty POV game play
The Nerf gun complements the gameplay view that Call of Duty players have

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?

woman holding a view master toy up to her face to look through it
I am 90% sure young Alfredo doesn’t know what a Viewmaster is (even I had to Google it)

5 comments
Jump to the comment form

Avatar

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!

Reply to David

Avatar

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.

Reply to CheezeBeard, The Lunchroom Pirate

Avatar

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 🤔.

Reply to Alfredo Sequeida

Avatar
Avatar

Cool project! You will need 2 accelerometers to get that third axis for proper 3d spatial recognition of the nerf gun.

Reply to Joe

Replying to David
Cancel reply?