I recently received this 2-wire door detection sensor (see image below). How can I connect it to my RPi without causing either damage?
After some further research, I would like to edit my question. I discovered that this is an ultra-thin dual magnet opening detector. Its characteristics: low voltage output signal, TOR, 3V3 INPUT, output on two wires: DOUT and VCC.
After a search on Google, it seemed to me that the principle of using all sensors of this kind with an RPi is the same. But I have seen fritzing where the two wires are connected directly to the GND and to another GPIO of the RPi. Yet some articles talk about using a resistance ranging between 1-10khm to protect the RPi.
This is the reason why I post this question, I would like to have some help on how to proceed. I am using a Raspberry Pi 3.