Need help reversing a button


I’m sure there is a simple solution to this but I can’t find one. I have an led wired similar to Instead of the LED fading in and out, I want the LED to light up by default and turn off when a button is held in. I know I can do this using code, but I was wondering how to do this using only the 5V and GND pegs.

Any help will be appreciated.

Use a normally-closed switch.

I knew it was something simple. I did not know those existed.


Let the pushbutton short the LED. This will draw a little bit more current but..........