It seems strange that pin is set to INPUT rather than INPUT_PULLUP, but without a wiring diagram, who knows?
Also, instead of deleting the "if", fix it. Shouldn't there be a digitalRead somewhere?
It seems strange that pin is set to INPUT rather than INPUT_PULLUP, but without a wiring diagram, who knows?
Also, instead of deleting the "if", fix it. Shouldn't there be a digitalRead somewhere?