door lock detection.
this is with a pinoccio scout (no longer sold). its arduino compatable. d2 is an input and it goes to ground when it touches the spring in the back of the bolt hole.
to keep the spring centered i cut plastic from a milk gallon jug to fit, sandwiched the wire and the bottom part of the spring, and hot glued it