Could somebody please explain the reason the following circuit works "fine" (LED is on if the button is pressed) only if the Pin 12 is in the OUTPUT-mode? I need to be able to digitalRead() the button state (pressed/not pressed) and the LED should be on every time the button is pressed without using two pins (one input and one output). What is the proper way to achieve that?
Switches to control LEDs and can be read by Arduino - General Electronics - Arduino Forum
how to connect these? - Project Guidance - Arduino Forum
Button box with light buttons - Project Guidance - Arduino Forum
A proper way to use a button and an LED - General Electronics - Arduino Forum
Push-button Debouncing question - General Electronics - Arduino Forum
Button Toggle LED - Arduino Tutorial
Button with led (how to connect?) - General Electronics - Arduino Forum
Blink two LEDs with Arduino
control big dome button using arduino - General Electronics - Arduino Forum
Button Board - General Forum - Chief Delphi
L2: Blinking an LED - Physical Computing
A proper way to use a button and an LED - General Electronics - Arduino Forum