Night Mood Lamp

by ItsKasper in Craft > Art

123 Views, 0 Favorites, 0 Comments

Night Mood Lamp

IMG-3522.jpg

這是一個晚上可以用來觀賞用的小夜燈,由於改良到只用一顆燈泡<直式的時候不會感到刺眼而且可以開著它睡覺。這個作品是參考https://www.instructables.com/Arduino-LED-Light-1/#discuss的。

Supplies

- 三條電線

- 兩個電阻

- 兩顆LED小燈泡

Circuit

image_55415491.JPG

Code

void setup(){ // put your setup code here, to run once:

pinMode( 7 , OUTPUT); // sets the digital pin as output }

void loop(){ // put your main code here, to run repeatedly: digitalWrite( 7 , HIGH ); // sets the digital pin on/off delay( 10000 ); // waits a few milliseconds }

June 12, 2021