# 3. Arduino - Turn LED ON and OFF With Button

[Turn LED ON and OFF With Button Tutorial](https://roboticsbackend.com/arduino-turn-led-on-and-off-with-button/)

### Equipment

- 1x Arduino Uno
- 1x USB 2.0 cable type A/B (for USB-A PC)
- 1x USB 2.0 cable type C/B (for USB-C PC)
- 1x Push Button
- 1x Push Button Module
- 1x breadboard
- 6x Jumper wires
- 1x LED
- 1x 220 Ohm resistor
- 1x 10k Ohm resistor

### Project Set-up

[![image.png](https://scil-wiki.su.edu/uploads/images/gallery/2026-06/scaled-1680-/yrcimage.png)](https://scil-wiki.su.edu/uploads/images/gallery/2026-06/yrcimage.png)

Code to turn light on when button is held:

[![image.png](https://scil-wiki.su.edu/uploads/images/gallery/2026-06/scaled-1680-/Csbimage.png)](https://scil-wiki.su.edu/uploads/images/gallery/2026-06/Csbimage.png)

##### Code to turn button on and off LED with button:

[![image.png](https://scil-wiki.su.edu/uploads/images/gallery/2026-06/scaled-1680-/uv8image.png)](https://scil-wiki.su.edu/uploads/images/gallery/2026-06/uv8image.png)