Controlling Lantern Using Push Botton

by Darrenlu15 in Craft > Costumes & Cosplay

186 Views, 0 Favorites, 0 Comments

Controlling Lantern Using Push Botton

IMG_6572.jpeg
截圖 2021-05-21 下午10.18.15.png

I found the idea from https://www.instructables.com/Controlling-LED-Wit...

The Controlling Lantern Using Push Botton is made by Arduino Leonardo.In this project, I have two switch buttons that can control LED lights' color. Both Botton represents both different colors. Both button can control the on and off of the light, and could turn on at the same time to form different mix color. The light is cladded by a lantern; therefore, it is more like a light bulb instant of LED light.

Supplies needed:

1. Arduino Leonardo x 1

2. Arduino Breadboard x 1

3. Button x 2

4. Jumper x 30

5. resistors x 2

6.USB to micro-USB B Cable x1

7.Computer x 1

8.Cardboard x 5

9.Tape x 1

10.Red envelope x 1

11.LED light x 2

Step 1: Make a Lantern

IMG_6574 2.JPG
IMG_6575.JPG
IMG_6576.JPG

1. Cut the red envelope in half.

2. Use the scissors to cut every slide to 0.5cm

3. Stick the end to the other end.

4.Lantern is made.

Step 2: Connect the Button

IMG_6573.JPG

1. Connect positive (5v) to the first line. and connect negative (GND) to the second line.

2. Connect every line to the where it belongs according to the diagram.

3. Test the button and see if the LED light can work.

Step 3: Make the Box by Cardboard

IMG_6577.JPG
IMG_6582.JPG
IMG_6583.JPG

1. Use cardboard to cut four (18cm * 12cm) size of base and roof of the box.

2. Use cardboard to cut two(12cm * 12cm) size of two sides of the box.

3. Use tape to stick every edge and every side, so that the box would fall of easily.

4. You may use hot glue gun if needed.

5. After you make the box, make sure you drill two holes for the button to get through. And drill one little hole, for the LED light to come out.

6. Put the Arduino board inside of the box, and connect every thing. Especially for the button connection. Make sure to put it from the top to inside of the box.

7. Put the Lantern you made on top of the LED light you have taken out from the box.

Step 4: Coding

https://create.arduino.cc/editor/darrenlu/fa562992-8b54-4813-96fd-9189eb139a71/preview

Use this code and upload the code to the Arduino coding site.

And then connect the code to you Arduino Leonardo.

And then you may press the button to see the Lantern!

Step 5: Final Result

Controlling Lantern Using Push Botton is finally made.

You may control the light or even switch the light color you want!

It may use as regular light for other kind of stuff.
Let's try it now.