DIY Laser Tag Using Arduino

by THE UPSTAIRS INVENTOR in Circuits > Arduino

1678 Views, 2 Favorites, 0 Comments

DIY Laser Tag Using Arduino

DSC_0029.JPG
DSC_0033.JPG

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

Making the Vest - Part 1 - Supplies

DSC_0002.JPG

SUPPLIES

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

Making the Vest - Part 2

DSC_0004.JPG
DSC_0009.JPG
DSC_0022.JPG

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

Making the Gun- Part 1 - Supplies

DSC_0017.JPG

SUPPLIES

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

Making the Gun- Part 2

DSC_0015.JPG
DSC_0023.JPG
DSC_0024.JPG

  • 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

Electronics

laser tag.png

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

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);
    }
}

CODE for 2nd Vest

DSC_0035.JPG
#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);
    }
}