3. Arduino - Turn LED ON and OFF With Button

Turn LED ON and OFF With Button Tutorial

Equipment

Project Set-up

image.png

Code to turn light on when button is held:

image.png

Code to turn button on and off LED with button:

image.png


Revision #2
Created 2026-06-11 16:22:06 UTC by Mariah
Updated 2026-06-11 17:22:52 UTC by Mariah