DIY Laser Tag Using Arduino

Introduction: DIY Laser Tag Using Arduino

I've always wanted to build a laser tag to play with my siblings at home. Since its quarantine and we are so bored, I decided to make a laser tag with arduino.

This instructable will be divided into three parts –

· Steps 1 – 3 - making the vest

· Steps 1 – 3 - making the gun

· Steps 1 – 3 - Electronics

Step 1: Making the Vest - Part 1 - Supplies

SUPPLIES

  • Cardboard
  • Sewing kit
  • Shoulder strap from bags
  • Bag clips

Step 2: Making the Vest - Part 2

  • Start by arranging the electronics in the cardboard , cut it and paint it .
  • Then hot glue or sew the shoulder straps the the cardboard as shown in the picture above.

Step 3: Making the Gun- Part 1 - Supplies

SUPPLIES

  • Cardboard
  • 8 inch long PVC pipe
  • Nuts and Bolts

Step 4: Making the Gun- Part 2

  • Measure and cut the handle of the gun as shown .
  • Paint the handle with color of your choice
  • Attach the handle to barrel as shown with nuts and bolts

Step 5: Electronics

Refer the above schematics to solder the components together.

The ir led and the push button goes on the gun whereas the one ir receiver goes on the back of the vest and one ir receiver goes to the front of the vest.

One you have finished soldering , you can upload the code

Remember to download and include the necessary libraries in your folder:
IRRemote: https://github.com/z3t0/Arduino-IRremote

Step 6: CODE for 1st Vest

#include <IRremote.h>
int red_LED = 9;
int green_LED = 8;
IRsend irsend;
int RECVa_PIN = 5;
int RECVb_PIN = 6;
const int button1 = 4; //trigger

void setup() {
    pinMode(red_LED, OUTPUT);
  pinMode(green_LED, OUTPUT);
  
    pinMode(button1, INPUT);
  irrecva.enableIRIn();}
    irrecvb.enableIRIn();}


void loop() {
  digitalWrite(red_LED, HIGH);
if (digitalRead(button1) == HIGH){
  timer = 0;  
  delay(50);
  irsend.sendNEC(0x34895725, 32);}
  if (irrecv.decode(&results))
  {
    if (results.value == 0x56874159)
    {

      digitalWrite(green_LED, HIGH);
    }
}

Step 7: CODE for 2nd Vest

#include <IRremote.h>
int red_LED = 9;
int green_LED = 8;
IRsend irsend;
int RECVa_PIN = 5;
int RECVb_PIN = 6;
const int button1 = 4; //trigger

void setup() {
    pinMode(red_LED, OUTPUT);
  pinMode(green_LED, OUTPUT);
  
    pinMode(button1, INPUT);
  irrecva.enableIRIn();}
    irrecvb.enableIRIn();}


void loop() {
  digitalWrite(red_LED, HIGH);
if (digitalRead(button1) == HIGH){
  timer = 0;  
  delay(50);
  irsend.sendNEC(0x56874159, 32);}<br>  if (irrecv.decode(&results))
  {
    if (results.value == 0x34895725)   
<pre>   {

      digitalWrite(green_LED, HIGH);
    }
}
Toys and Games Challenge

Participated in the
Toys and Games Challenge

Be the First to Share

    Recommendations

    • Space Contest

      Space Contest
    • Organization Contest

      Organization Contest
    • Micro:bit Contest

      Micro:bit Contest

    Comments