Double LED Blinking

Introduction: Double LED Blinking

This Arduino project is a revised version of the project "How to Blink LED Using Arduino" :)

Step 1: Prepare 準備材料

  • 兩個LED燈(自行選色)
  • 兩個電阻
  • Arduino Leonardo
  • 麵包板
  • 三條電線
  • USB連接埠
  • 裝飾物蓋住LED燈泡(如果想做成夜燈類)

Step 2: 組裝

(如上圖~!)

Step 3: Download or Copy Code to Arduino App 下載或是複製程式碼到Arduino程式

gistfile1.txt

// the setup function runs once when you press reset or power the board
void setup()
{
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
pinMode(11, OUTPUT); //輸入另一個LED
int analogPin = 0;
}
// the loop function runs over and over again forever
void loop()
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(11, LOW);//讓另一個LED暗
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
digitalWrite(11, HIGH);//讓另一個LED亮
delay(1000); // wait for a second
}
view rawgistfile1.txt hosted with ❤ by GitHub

Step 4: Connect Arduino Board to Computer 將arduino版接上電腦

Step 5: 完成啦~~~~~

Be the First to Share

    Recommendations

    • Robots Contest

      Robots Contest
    • Retro Tech Challenge

      Retro Tech Challenge
    • Halloween Contest

      Halloween Contest

    Comments

    0
    Elaina M
    Elaina M

    1 year ago

    Congratulations on your first instructable :) What revision did you make to the original project ?