I have a project for an Escape Room. In this project voltage from the 3V is routed through a wire and back to an input digital pin. Sometimes, even though the wire is not attached, the pin reads HIGH.
Being a software guy, I'm seeking some advice on how I can be certain that the line only reads HIGH when the wire is properly attached. What is it I should add to the circuit to suppress random voltage on the lines?