標題:
基礎數位輸出 (三)
[打印本頁]
作者:
tonyh
時間:
2019-7-17 14:29
標題:
基礎數位輸出 (三)
[attach]6838[/attach]
void setup()
{
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(10, HIGH);
delay(50);
digitalWrite(10, LOW);
delay(50);
digitalWrite(11, HIGH);
delay(50);
digitalWrite(11, LOW);
delay(50);
digitalWrite(12, HIGH);
delay(50);
digitalWrite(12, LOW);
delay(50);
digitalWrite(13, HIGH);
delay(50);
digitalWrite(13, LOW);
delay(50);
}
複製代碼
作者:
莊博丞
時間:
2019-7-17 14:47
void setup()
{
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}
void loop()
{
digitalWrite(12, HIGH);
delay(50);
digitalWrite(12, LOW);
delay(50);
digitalWrite(11, HIGH);
delay(50);
digitalWrite(11, LOW);
delay(50);
digitalWrite(10, HIGH);
delay(50);
digitalWrite(10, LOW);
delay(50);
digitalWrite(9, HIGH);
delay(50);
digitalWrite(9, LOW);
delay(50);
}
複製代碼
作者:
林凱榮
時間:
2019-7-17 14:48
void setup()
{
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(113, OUTPUT);
}
void loop()
{
digitalWrite(10, HIGH);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(10, LOW);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(11, HIGH);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(11, LOW);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(12, HIGH);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(12, LOW);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(13, HIGH);
delay(50); // Wait for 1000 millisecond(s)
digitalWrite(13, LOW);
delay(50); // Wait for 1000 millisecond(s)
}
作者:
鄭豊翰
時間:
2019-7-17 14:50
void setup()
{
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(10, HIGH);
delay(50);
digitalWrite(10, LOW);
delay(50);
digitalWrite(11, HIGH);
delay(50);
digitalWrite(11, LOW);
delay(50);
digitalWrite(12, HIGH);
delay(50);
digitalWrite(12, LOW);
delay(50);
digitalWrite(13, HIGH);
delay(50);
digitalWrite(13, LOW);
delay(50);
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/)
Powered by Discuz! 7.2