Introduction: 3 LED Blinking Lights
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
Step 1: 3 Blinking LED Lights
I am going to show you how to create a 3 LED blinking lights system.
Step 2:
Wire the gnd wire to the negative on the breadboard.
Step 3:
Connect 3 wires on the DIgital Pins 13, 12 and 11
Step 4:
connect negative wires onto the breadboard
Step 5:
connect the resistor and the LED lights onto the breadboard
Step 6: Extra Decorations
I put a box over my Arduino board and carved 3 holes so the LED lights will go through it.
Step 7: 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