ZAP Game Gun

About: I enjoy opening up things,and modifying them,I like Robotics and would like to change world

Through this Instructables, I would like to introduce you to my game gun. The point of this project is to develop a gaming arcade gun. which you can within 2 to 3 hr. If you try to describe it you may tell it as a combination of, keyboard and air mouse.

this gun can be used for playing various FPS games.

MOTIVATION

The motivation of this game gun is itself from the arcade games. This project is a perfect match for people who love games, as well as are a fan of Arduino.

It is a project which would not need time more than 3 hr.

WORKING

The working of the project is as easy as ABC!

the set of program works with a set of and, else conditions forming the entire code.

the gun replicates air mouse and keyboard. The gyroscope present in the gun helps to track down the movements of the gun and commands the computer to place the mouse pointer on the following place.

similarly, joystick present in the gun tries to replicate the joystick present in the game console. It helps the user to navigate front, back, right, left in the game. In addition to this, it also helps to jump.

IR sensor helps in triggering the aim a

*all above it*

You can just change the assigned keys in the program as per the game.

Supplies:

Things you will need to make this project are:

  1. Arduino Leonardo.
  2. MPU-6050/gyroscope
  3. Joystick
  4. Tactile Push button
  5. PCB etching kit
  6. wire
  7. male berg strip
  8. female berg strip.
  9. IR sensor

*You can get these supplies online or in local stores.*


Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: STEP 1: Making the Circuit.

For this, you will need copper clad and ferrous chloride solution.

You can get any wherein a local electronics shop or I recommend buying a' PCB etching kit'.

It may be the most useful tool for this process.

To make the PCB diagram you will need to use fritzing or you can also use EAGLE.

I have uploaded the links for PCB design in this Instructables.

To make the PCB you can follow steps given in Making your PCB.

Step 2: Step 2: Connecting Circuit

After production of PCB just mount all the parts on PCB.

*You can also use a breadboard for so*

*connection summery*

buttonPin = 4 buttonPin1 = 5

buttonPin2 = 6 buttonPin3 = 7

buttonPin4 = 8 buttonPin5 = 9;

buttonPin6 = 10 buttonPin7 = 11;

buttonPin8 = 12; buttonPin9 = 13;

buttonPin10 = A1; analogPin = 0;

buttonPINjoy = A2

VRyPIN = A3; VRxPIN = A4;

Step 3: STEP 3: Assembling Parts

Before this process, you will need to wire the sensors and joystick to female burg strip so they would fit in the male header pins that you soldered on the PCB.

Now, the step is simple.

I would not like to tell much about this process.

Just to tell you, in this process, you have to open up a gun and assemble (attach)all the parts inside the gun.

As the gun may be different with everyone it is on you how to assemble.

You can see in images above how I arranged my gun.

Step 4: STEP 4: Installing Software

To use the gun you will need to download Arduino software and any game which you desire to play.

These all are the requirements of the gun.

to use the gun just connect the port of Arduino Leonardo to USB port of PC or Laptop.

the gun will be recognized as an authorized mouse and keyboard for the device.

Step 5: STEP 5: Customization of Gun

To change the controls of the gun you would need to change the source code of the gun.

I will show where to change

if (buttonState7 == LOW && previousButtonState == HIGH) { Keyboard.write("j");//special granade }

if (buttonState8 == LOW && previousButtonState == HIGH) { Keyboard.write("f");// pick up any weapon }

if (buttonState9 == LOW && previousButtonState == HIGH) { Keyboard.write("n");//night vision}

to change controls replace the bold letters with controls which you want.

*similar conditions apply to all the if conditions.*

Step 6: STEP 6: Enjoy!!

Now your gun is ready.

enjoy it...

The code files.

Step 7: STEP:7 :Future Improvement

As we talk about anything, we know everything have to evolve with time.

so we have future developments in this gun

  1. Can be made Bluetooth gun instead of USB cables.
  2. Can be made more realistic.

If you get any future improvement or any suggestions

please

comment

in the comment section

below...

Feel free to ask questions, As questions have only made way for great discoveries.

Games Contest

Participated in the
Games Contest

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions