LED Night Light

by linlinhsieh0801 in Circuits > Arduino

206 Views, 0 Favorites, 0 Comments

LED Night Light

IMG_0233.JPG
IMG_5510.JPG
IMG_8602.JPG

Remaking Arduino: https://kknews.cc/news/mqxjvl6.html

This device is a night light, it can also help you adjust your breathing to help your sleep.

Supplies

Arduino

Computer

LED's

Resistors

paint you like

wire

Let's Do This

IMG_7461.jpg
IMG_7462.jpg
IMG_7465.jpg

Select 3 LED colors you like from the kit, then take 3 out. Increase or decrease the color and quantity if you wish. If you want to add color, just make sure to add an extra resistor and wire to the open Arduino pin.

*Keep in mind that the Arduino does not provide a lot of power, so at some point, adding more LEDs will only darken them all.

GND

Start by adding a wire between the ground (negative "-" )rail of the breadboard and the GND pin of the Arduino. Make sure that the Arduino and all the components on the breadboard share a common point in the completed circuit so that a complete circuit can be constructed.

LED

IMG_7467.jpg
IMG_7469.jpg

Connect the pins to the board, then connect them in parallel, connect the long leg of LED to the resistors, and then connect the short leg of LED to the negative poles.

Repeat this action until you have all the LED on.(If you have nine LED, you should repeat this action nine times.)

Then you're done.

Coding

IMG_7478.JPG
IMG_7475.jpg
IMG_7476.jpg
IMG_7477.jpg
LED night light

有一種稱為4 7 8的呼吸方法。呼吸4秒鐘,然後窒息7秒鐘,最後呼氣8秒鐘。

1.因此我們直接將del設置為500,因為其中的1000是一秒。當它閃爍時,將是一秒鐘。

將pin8設置為白色(您需要呼吸)

將pin9設置為橙色(您需要屏住呼吸)

將pin10設置為紅色(您需要呼氣)

2.當引腳為高電平時,LED將點亮

延遲0.5秒

當引腳腳變低時,LED熄滅

延遲0.5秒

然後你完成一閃,這是一秒鐘

如果您了解所有這些內容,則可以開始製作LED夜燈。代碼就像圖片一樣。

你在等什麼 !!!!!!!!!!!!!

Downloads