I want to have a sensor to let me know if a door is locked or not. I've placed two wires inside the lock mechanism of the door, so when the door is locked the continuity test on the multimeter make a sound, if is unlocked it doesn't make a sound (no continuity).
I've tried to replicate that with a NodeMCU. I have follow the same example as a push button,
3V3 -> BUTON Pin 1 |-| Button Pin 2 -> 10k Ohms -> GND -> D7 (Digital 7 GPIO)
This works fine with the switch button, but when I replace the switch button with the wires on the door, nothing happen.
I checked the Ohms on both cases, the switch on rest have 10M Ohms, and when pressed have 0.4 Ohms.
The door when is closed have continuity with 16 Ohms, when is open it doesn't have anything (no continuity, no ohms, open circuit).
What I am missing here ? Another question, if a person touch the door (has metal on it) it can catch a spark or anything ? It's safe ?
The final goal is mimic the behaviour of the multimeter.
EDIT: Looks like some alligator cables I was using were in a bad shape. I've replaced but still it doesn't work. After checking everything and trying again, it is WORKING!
I will try to start solder some cable to proper connect each other without using alligators.