Hasan Alp Güngör

Hardware · Game controller

AK-47 Controller for CS2

I turned an airsoft AK-47 into a controller for Counter-Strike 2. Wherever you point the rifle, your aim in game follows, and pulling the trigger fires.

  • Arduino Uno
  • C++
  • MPU-6050
  • Gyroscope
AK-47 Controller for CS2

About the project

What I built and how.

I wanted to play CS2 as if I were really holding a rifle. An MPU-6050 gyro sits on the rifle and is read by an Arduino Uno. As you move the rifle, the gyro readings turn into mouse movement on the PC, so you aim by actually turning the barrel.

The Arduino is connected to the PC over USB, and pulling the trigger fires in game. For walking I use the pedal from a racing wheel set, so both hands stay on the rifle. The video of a full match played with it is below.

Highlights

  • 01

    Gyro aiming

    The MPU-6050 measures how the rifle turns, and that turns into mouse movement in game.

  • 02

    A real trigger

    Pulling the rifle's own trigger fires in game.

  • 03

    Walking with a pedal

    A racing wheel pedal handles walking, so both hands stay on the rifle.

  • 04

    Wired over USB

    The Arduino Uno is wired to the PC, which keeps the setup simple.

Video

Watch how I built it.

Next projectGoal Detector SystemHardware project