Button with hardwired LED


I will be attaching buttons as input to my Arduino and I want an indicator LED to know when the button is pressed. However I want LED functionality wired directly to the button - not controlled via Arduino digital output.

My first thought was to simply wire the LED in parallel with the digital read circuit (10kOhm pull up resistor). (See left figure).

But I realised I could simplify the circuit on the right and simply use the LED with its resistor as my pull up resistor for the digital read pin. (See right figure)

I think this should work but I just wanted to check quickly - is there any reason this might not be a good idea?

Thank you! :slight_smile:

Hi Use the right figure, and turn on the internal PULL_UP resisitors.

Tom.. :)