Push button not holding state

Not sure if this is the right place...

So I've got a basic pull-down push button switch, (the mini switches so only a single leg either side). One wire from side A to a 10k resistor to ground, same side A to pin D3; other side of switch, let's call it side B shall we? to +3.3v.

Program loop reads D3 and outputs to the monitor.

Is normally 0, that's fine. When I press the button it kind of 'blips' high - might get 10-20 1s on the monitor then it returns to 0. I thought it was possibly some sort of momentary switch so bypassed it and used a wire in it's place - same thing.

Now I'm learning as I'm going - I'm sure it's something simple - maybe 10k is too high for 3.3v in this instance or something? But I want the switch to be high for as long as I hold it, then drop back to low.

thanks :slight_smile:

So... note to self. Check really carefully that you're using the right inputs. Cos unused inputs and nearby high/low voltages can make things act really odd.

Problem solved. tl/dr: I'm an idiot.

(deleted)

Installation & Troubleshooting
For problems with Arduino itself, NOT your project