Cinderella-LED Light

by niniwu1207 in Circuits > Arduino

137 Views, 0 Favorites, 0 Comments

Cinderella-LED Light

截圖 2021-05-11 下午12.14.12.png

Idea from: https://www.instructables.com/Flowing-LED-Lights-...

About: I want to make this so that the LED lights can display the blue lights in a decorative form. Using the glass heels as an idea of the theme, from small glasses leading to the main character--Cinderella. Therefore, I think it is a beautiful LED light which uses Cinderella as the main idea.

*Since my main theme is Cinderella, I use all blue LED lights in this case
Code: https://create.arduino.cc/editor/niniwu/af9a36c5-3...

Supplies

- Arduino Uno board * 1

- USB cable * 1

- Resistor (110Ω) * 8

- LED * 8

- Potentiometer * 1

- Breadboard * 1

- Jumper wires

- Paper

- Pen

Build the Circuit

IMG_9615.JPG

1. Plug 8 wires into D2-D9, and plug the other edge of the wires into the breadboard

2. Plug one edge of the 8 resisters on the same line as the previous wires, the other edge of the resisters should be on the same line as well.

3. Plug one edge of the other 8 wires beside each resister. and the other edge should be plugged into the negative column.

4. Plug the longer leg of the LED light beside the resister.

5. Plug the shorter leg of the LED light beside the wires mentioned in step 3.

6. Repeat step 5 for all 8 light bulbs

(Light bulbs can be in any color as you want, in this case I use all blue light bulbs to fit the theme)

(Follow the picture shown)

Draw the Decorations

截圖 2021-05-10 下午10.51.52.png

1. In this case, we'll draw the small pieces of glass first.

2. Draw small decorations (glass heels) on a paper

3. Draw the main character (Cinderella) at step 2's right

4. Use a black pen to trace your drawings

5. Cut down the whole piece of drawing

6. Check if the drawings fit your light bulbs

7. Enclose the light bulb with the decorations you drawn.

8. Use tape to stick the seamed area

Set Up the Code

const

int lowestPin = 2;//the lowest one attach to

const int highestPin = 9;//the highest one attach to

/**************************************/

void setup()

{

//set pins 2 through 9 as output

for (int thisPin = lowestPin; thisPin <= highestPin; thisPin++)

{

pinMode(thisPin, OUTPUT); //initialize

}

}

/****************************************/

void loop()

{

//iterate over the pins

//turn the led on from lowest to the highest

for (int thisPin = lowestPin; thisPin <= highestPin; thisPin++)

{

digitalWrite(thisPin, HIGH); //turn this led

delay(100);//wait for 100 ms

}

//fade from the highest to the lowest

for (int thisPin = highestPin; thisPin >= lowestPin; thisPin--)

{

digitalWrite(thisPin, LOW); //turn this led

delay(100);//wait for 100 ms

}

for (int thisPin = highestPin; thisPin >= lowestPin; thisPin--)

{

digitalWrite(thisPin, HIGH); //turn this led on

delay(100);//wait for 100 ms

}

for (int thisPin = lowestPin; thisPin <= highestPin; thisPin++)

{

digitalWrite(thisPin, LOW); //turn this led

delay(1000);

}

}

Cinderella's Glass Heels

Cinderella Arduino

Once you upload the code, Cinderella and the shattered glass will be in blue, while the glass heels be in yellow.

THEN you're done! A beautiful decoration is born.