3 LED Blinking Lights

by Ap0ll0111 in Circuits > Arduino

295 Views, 0 Favorites, 0 Comments

3 LED Blinking Lights

IMG_20200414_210031.jpg
Arduino summative

Here is the video to the system when I finished.

專題介紹/内容:這個專題是我用一個盒子蓋住我的板子,然後讓燈出來,就可以看到燈閃了。

原本的來源: https://www.instructables.com/id/How-to-BLINK-Led-...

Supplies

You will need:

Arduino Board

Breadboard

3 LED lights

3 Resistors

7 Connecting Wires

3 Blinking LED Lights

IMG_20200412_160054.jpg

I am going to show you how to create a 3 LED blinking lights system.

IMG_20200412_160632.jpg

Wire the gnd wire to the negative on the breadboard.

IMG_20200412_161852.jpg

Connect 3 wires on the DIgital Pins 13, 12 and 11

IMG_20200412_164729.jpg

connect negative wires onto the breadboard

IMG_20200412_170210.jpg

connect the resistor and the LED lights onto the breadboard

Extra Decorations

IMG_20200414_210031.jpg

I put a box over my Arduino board and carved 3 holes so the LED lights will go through it.

Code for the System

The code for the whole system is

void setup(){ // put your setup code here, to run once:
pinMode( 13 , OUTPUT); // sets the digital pin as output pinMode( 12 , OUTPUT); //改 多加了兩顆燈 pinMode( 11 , OUTPUT); //改 多加了兩顆燈 }

//改 多加了兩顆燈 void loop(){ // put your main code here, to run repeatedly: digitalWrite( 11 , HIGH ); // sets the digital pin on/off digitalWrite( 12 , HIGH ); // sets the digital pin on/off //改 多加了兩顆燈 digitalWrite( 13 , HIGH ); // sets the digital pin on/off //改 多加了兩顆燈 delay( 1000 ); // waits a few milliseconds digitalWrite( 11 , LOW ); // sets the digital pin on/off digitalWrite( 12 , LOW ); // sets the digital pin on/off //改 多加了兩顆燈 digitalWrite( 13 , LOW ); // sets the digital pin on/off //改 多加了兩顆燈 delay( 1000 ); // waits a few milliseconds }

Link for the code: https://create.arduino.cc/editor/ap0ll0111/5006cee8-bd2b-4e35-886d-88360ffcb874/preview