---
# System prepended metadata

title: Arduino LED閃爍程式
tags: [Arduino]

---

# Arduino LED閃爍程式
int LED=13;   //宣告LED位置

void setup()   //初始設定
{
  pinMode(LED,OUTPUT);   //設定LED為輸出端

}

void loop() {
  digitalWrite(LED,HIGH);   //點亮LED
  delay(200);   //保持亮200ms(0.2s)
  digitalWrite(LED,LOW);    //關閉LED
  delay(200);   //保持不亮200ms(0.2s)
}

{%youtube mOUI0-C1dyU %}
###### tags: `Arduino`