0
\$\begingroup\$

I built a laser tag gun using an Arduino,but there is a problem. When I use it indoors with lens or without I have beam reflections. If I shoot on the wall the receiver also claims a "hit." Is there a method to prevent the beam reflection?

I'm using IRremote.h library. For receiving the message I use a TSOP32236 receiver and I use 8 degree angle IR LED.

    #include <IRremote.h>

const int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;
const int led = 10;

void setup(){
  Serial.begin(9600);
  irrecv.enableIRIn();
  irrecv.blink13(true);
  pinMode(led, OUTPUT);
}

void loop(){
  if (irrecv.decode(&results)){
        Serial.println(results.value);
        if(results.value == 2704){
          digitalWrite(led, HIGH);
          delay(100);
          digitalWrite(led, LOW);
          }
          else {
            digitalWrite(led, LOW);
            }
        irrecv.resume();
  }
}
\$\endgroup\$
3
  • \$\begingroup\$ Please add more info about how you measure the reflection technically \$\endgroup\$
    – Sim Son
    Commented Jan 31, 2021 at 9:41
  • 1
    \$\begingroup\$ paint the walls black \$\endgroup\$
    – jsotola
    Commented Jan 31, 2021 at 9:53
  • \$\begingroup\$ I've never played laser tag but if it uses laser the beam will be narrow and will form a spot. It sounds like you may be using infra red LEDs which will have a very wide angle output. This is a fundamental problem. \$\endgroup\$
    – Transistor
    Commented Jan 31, 2021 at 10:55

1 Answer 1

1
\$\begingroup\$

IR reflects. There's not a lot you can do about that, other than painting the walls black, as suggested by jstola in the comments.

Giving your gun an indoor mode, with a much lower power, would help. Also consider the beam width.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.