I'm creating a circuit using an Arduino Nano + ESP8266 to allow LED remote (via mobile app) activation and configuration (RGB colour, timeout, etc.). The circuit also has an optional PIR sensor to switch on the LED when someone enters the room.
I'd like the circuit to behave differently when the PIR is physically connected to the Arduino (i.e. to light the LED in a different colour) but I have no idea of how detect if the sensor is physically connected to the circuit.
I tried reading the value of the Arduino PIN but (obviously) the signal is LOW whether nothing is detected by the PIR or is not physically connected.
I have two different PIR detectors that I can use for the project:
- Arduino Compatible PIR Motion Detector (Description)
- DFRobot PIR Detector (Description, Schematic)
Thank you for your time. If there is missing information in my question, please tell me and I will add it.