Beginner Problem, Button Push

Hello,

I am just having a small problem with testing a push button to turn on/off an LED.

I set up everything and loaded my the push button example into my board however when the program starts the LED is on (dim) and when I press the button it gets brighter. Shouldn't the LED go off and when the button is push go on?

Does anyone know why this is happening?

I am using a single throw two position switch where one side is connected into the board and the other side is getting to the +5V and a pull-down resistor to ground.

What am I doing wrong?

The pull down needs to be on the board side of the switch - it should hold the voltage down until the switch closes - then the pin gets connected to +5 by the switch which overrides the pull-down.

ahhh, thank you very much.

Read the schematic wrong.

I'll ask here instead of starting a new thread.

If I want to have multiple push buttons and switch running off the same board. Can I connect all of them to the same +5V and the same pull-down resistor?

Thanks

If I want to have multiple push buttons and switch running off the same board. Can I connect all of them to the same +5V

Yes.

and the same pull-down resistor?

No. Each switch needs a separate circuit, with it's own resistor.