When I pass +5v through pin 4, nothing happens.
Where is the 5V coming from?
Why not use INPUT_PULLUP as the mode, and connect one leg of the switch to ground and the other leg to the digital pin. Then HIGH means not pressed and LOW means pressed.
When I pass +5v through pin 4, nothing happens.
Where is the 5V coming from?
Why not use INPUT_PULLUP as the mode, and connect one leg of the switch to ground and the other leg to the digital pin. Then HIGH means not pressed and LOW means pressed.