The wiring shown below combines a button with a LED. The LED will light up when the button is pressed. In its default state, the button breaks the circuit so that no current can flow and hence the LED will remain off. Pressing the button closes the electric circuit so that current can flow, lighting up the LED. Just like for the previous tutorial, the Arduino is only used as a power supply and no sketch needs to be uploaded. Similarly, the same rules for the resistor and the polarity of the LED apply as discussed earlier.
Tutorial