I'm trying to make a laser tag out of an arduino tsal6100 tsop4838
I connected the tsop4838 receiver to the Arduino and everything works well.
I use the "irremote" library.
I need to check at the sketch level whether the tsop4838 receiver is connected to the Arduino.
Maybe the cheaters disconnected it to play dirty.
I would like to check the connection with the tsop4838 receiver at the sketch level.
To prevent cheaters from playing dirty.
Help me understand is this possible?
can you tell me the queries for Google?
Maybe you can share the ready-made pieces of code?
No, it’s not possible directly. The sensor only has a high or low output. It’s the same as having a button and asking “can I tell if someone discounted the button?”.
About the only way you could do it would be if you have an ir LED on board, and the receiver can see the LED. Maybe, given your application, you do. In that case send a unique code (For that device) via IR. If you don’t receive your own code back via the receiver, something is broken....
I can also use an Arduino to control the power for the Tsop4838 sensor
also near the IR sensor is a normal red led and I can control the power for it with an Arduino.
Maybe these things can determine the connectivity of the entire head band.
When you apply power, and when not receiving any IR signal, you will get a logic HIGH from the sensor. So you could check for that.
Although without a sensor the pin would float, so you would need a pull down. And you'd need to make sure it was large enough that didn't interfere with the internal 33k pull up shown in the block diagram equivalent circuit in the datasheet...
But you would be missing by far the easiest way to defeat your system:
Leave the IR sensor connected, but cover it so it can't receive any signals.
it has a block diagram http://s1.bild.me/bilder/221219/4268114screenshot_2020-06-03_003.jpg
3 this is the power leg - 2 this is the ground leg - a 1 is a signal
the signal when no one shines on the sensor is the same as the power is supplied.
i.e. 5V
this simple feature makes it easy to check whether the bandage is connected
I will try this method - perhaps it will work.
thank you very much for your help