Aayush Trivedi
Published

Lighting System for Mini Christmas Tree

This is a Christmas tree lighted up with 4 differents LEDs.

BeginnerShowcase (no instructions)30 minutes205
Lighting System for Mini Christmas Tree

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
×8
Male/Male Jumper Wires
×9
Resistor 1k ohm
Resistor 1k ohm
×4
LED (generic)
LED (generic)
×4
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Christmas Tree (mini)

Story

Read more

Schematics

Christmas Lights

Code

Christmas Lights

C/C++
This is the code that makes the tree look awesome!
int led = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;

void setup() {
  pinMode(led, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);

}

void loop() {
  digitalWrite(led, HIGH);
  delay (500);
  digitalWrite(led, HIGH);
  digitalWrite(led3, HIGH);
  delay (500);
  digitalWrite(led3, HIGH);
  digitalWrite(led2, HIGH);
  delay (500);
  digitalWrite(led2, HIGH);
  digitalWrite(led4, HIGH);
  delay (500);
  digitalWrite(led4, HIGH);
  digitalWrite(led, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led4, LOW);
  delay (500);
}

Credits

Aayush Trivedi
1 project • 0 followers

Comments