本帖最後由 tonyh 於 2022-1-23 15:17 編輯
Arduino Uno 版- 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);
- }
複製代碼 WeMos D1 版- void setup()
- {
- pinMode(D10, OUTPUT);
- pinMode(D11, OUTPUT);
- pinMode(D12, OUTPUT);
- pinMode(D13, OUTPUT);
- }
- void loop()
- {
- digitalWrite(D10, HIGH);
- delay(50);
- digitalWrite(D10, LOW);
- delay(50);
- digitalWrite(D11, HIGH);
- delay(50);
- digitalWrite(D11, LOW);
- delay(50);
- digitalWrite(D12, HIGH);
- delay(50);
- digitalWrite(D12, LOW);
- delay(50);
- digitalWrite(D13, HIGH);
- delay(50);
- digitalWrite(D13, LOW);
- delay(50);
- }
複製代碼 |