ZAP Game Gun

by Innovator_Abhishek in Circuits > Arduino

1367 Views, 6 Favorites, 0 Comments

ZAP Game Gun

Free_Sample_By_Wix.jpg
1566755493986[1].jpg

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


STEP 1: Making the Circuit.

gun_pcb.jpg
Untitled.jpg

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: Connecting Circuit

1566754708668[1].jpg

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: Assembling Parts

1566755493986[1].jpg
1566755079816[1].jpg
1566755109303[1].jpg

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: 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: 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: Enjoy!!

Now your gun is ready.

enjoy it...

The code files.

Downloads

STEP:7 :Future Improvement

1566754708668[1].jpg

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.