Introduction: LED Christmas Light (with On/off)

This project is a modified version of , in which I added a button for the user to control when to turn the light on.


9 LED light bulbs (random or any colors)

10 220-ohm resistors

Arduino Leonardo

USB cable

12 M-M wires

A button

A Breadboard

Step 1: Construct Your Lights and Button

I aligned my LED light bulbs in a straight row, leaving space between each bulb so they won't crash into each other. For the LED light bulbs, I believe using 220-ohm resistor fits better for my eyes because the LED lights gets too bright while using the other weaker resistor. In addition, I changed the LED light's color to red, green, and white, which I believes gives off more of a Christmas vibe. After working with the lights, attach the button onto the breadboard, connect one of the legs of the button to 5V and the other leg to the negative rail including a 220-ohm resistor too (as the image shows).

Step 2: Modify or Paste Code.

After constructing the lights and the button, open the Arduino application and paste this code onto it.

For my modification, I added a if/else code in the loop part with the setup of input on D2, which is where my button is connected too. With this change, the user would be able to run the light when they want to just by pressing the button. This way, we could save energy and prevent unwanted waste of energy.

Step 3: Done! Enjoy!