Making an Colorful Arduino Christmas Lights

By Alexsandar | 21 December 2017 | 13 Comments




Christmas is approaching, so I decided to make a fancy decoration for my home. There are many kinds of Christmas lights available, but I decided to create one on my own. The simplest thing that I can think of is to hook up some leds to the Arduino and light them up. Without using an ic, you can connect at most 13 leds so you do not burn up the chip. I decided to use 12, just for aesthetic reasons.

Step 1: Things Needed:


12 LEDs
12 220-ohm resistors (or similar)
Arduino UNO
USB cable
12 M-to-M jumper wires
A breadboard

Step 2: Connecting the LEDs


Now, you need to plug in each led on the breadboard. I’ve aligned them in a row, 2 holes from each other so they can fit. The right side of the led needs to be the longer lead (anode, positive) that connects to a digital pin of the Arduino. The cathode goes to the negative rail of the breadboard, with a resistor. The rail is connected to GND (negative) of the Arduino. I’ve chosen digital pins 13 to 2, you can rearrange them in the code

Step 3: Modifying and Uploading the Code


Connect the Arduino to your computer using the USB cable. Start up the Arduino IDE and paste in the CODE FROM HERE. The different delays can be changed and also the sequence of animations.

Step 4: Understanding the Animations


For simplicity of the code, I’ve separated each sequence of blinks in a new function. Long story short - each animation has it’s function. In every one you can find a loop, which cycles through the array, containing the number of each led and the corresponding digital pin of the Arduino. Then, it turns them on/off to create those fancy effects. Each function ends with the execution of the off animation, which turns off all leds to get ready for the next one.
 

Step 5: Project Demonstration



In this prototype, I’ve included 4 basic animations - all-on (one by one), the chas er, the chas er with pairs and 50 random blinks.
arthurclin
December 27,2017 03:43
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 27,2017 01:25
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 23:48
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 22:11
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 20:36
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 19:02
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 11:30
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 09:51
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 08:12
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 06:34
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 04:58
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
arthurclin
December 26,2017 03:23
Wow, she is one of the most beautiful girls I have seen http://www.youtube.com/watch?v=xmxdAu6RQtM
inetryconydot
December 23,2017 08:29
<a href=http://fhbroute.com/5.html?group=MedFor&parameter=Antibiotics><b>Buy cheap <font color=red>Antibiotics</font> on line without prescription needed! .</b></a> <font color=green>* Secure ordering! * Free Shipping Worldwide * Lowest price gua
Leave a Reply
Your email address will not be published.Required fields are marked. *
Name *
Email *
Content
Popular blog
Categories