Cool and Easy Night Lamp

by FIreTrunk in Workshop > Home Improvement

299 Views, 0 Favorites, 0 Comments

Cool and Easy Night Lamp

IMG_3275.jpg
IMG_3273.jpg
IMG_3276.jpg
2019-06-04 23_43_15-.png
雷切(人物).png
雷切(武器和底座).png
IMG_3278.jpg
2019-06-04 23_08_45-Button_two_light _ Arduino 1.8.6.png
IMG_3277.jpeg
IMG_3274.jpg

To make a cool night lamp to put in your bedroom, you have to follow my instructions.

Warning: by not following the instructions, you will face failure, depress, and shame.

First, use the picture above to connect your LED light bulbs and button.

Second, design your own lamp, you can design your own lamp or use my design. I will put an AI file and a PDF file of my design above. (recommend using a laser cutting machine to cut my design of from a piece of wood) As you can see from my design, you can glue the three parts of my design together

Third, tape your light bulbs and your lamp together like the picture below shows.

Forth, copy my code below and paste it on your "Arduino IDE". Connect your computer to your Arduino board. and upload your code to your Arduino board.

void setup()

{

pinMode( 11 , INPUT); /////Button

pinMode( 12 , OUTPUT); /////LED light bulbs

}

void loop()

{

if (digitalRead( 11 )) /////if you turn on your button

{ digitalWrite( 12 , HIGH ); /////LED light bulb will shine

}

else /////if the button isn't switched on

{ digitalWrite( 12 , LOW ); /////LED light bulb will not shine

}

}

Supplies

Arduino Leonardo board *1

LED light bulbs *1

Wires

Breadboard *1

Button *1