Push button with Push button working erratically

Issue resolved

1-1_PW4_INT_16_65_F30.ino (2.37 KB)

have you tried to debounce?
check the arduino program “file/examples/02.digital/debounce”


Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

How have you got your push button wired, your code does not include a pull-up parameter? Do you have a pullup or pulldown resistor on the input pin?

Tom.. :)