question about the 'Debounce' example

just got the uno board and are working through some of the examples.

Currently we are stuck on the 'Debounce' example.

it seems that this bit of code 'int reading = digitalRead(buttonPin);' is always returning 1, even if the button is not pressed.

Is the push button broken? Do they break in the 'on' position? Is there any other way to determine if a push button is functioning correctly?



Which pushbutton?

It demands on how you have wired up the button and what code you are running, more information please.

I noticed that some of the push button wiring examples on this website are seemingly not correct. maybe thats the source of your problem. Do you use an pull down resistor and a button with +5VDC connected to one pin?

If you have a 4-pin pushbutton and have it rotated 90 degrees it will appear to be always closed.