Arduino push button not responding when in line with resistor

In that state you have the input floating so the result is to be expected and not recommended when using it in code.

So when you press the button it says "pressed" and when not pressed it says "not pressed".

Tom.... :smiley: :+1: :coffee::australia: