Last active
August 7, 2019 04:03
-
-
Save lazytomatolab/8fd0a0a5d13416ec482264f9e1e706d6 to your computer and use it in GitHub Desktop.
【Arduino SpeedUp】快速上手 Class 14 - 迴圈 while 稱霸 Arduino!更多資訊請造訪:http://www.lazytomatolab.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
pinMode(7, INPUT); | |
digitalWrite(7, HIGH); | |
pinMode(13, OUTPUT); | |
while(digitalRead(7) == HIGH) { | |
digitalWrite(13, HIGH); | |
delay(200); | |
digitalWrite(13, LOW); | |
delay(200); | |
} | |
} | |
void loop() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(115200); | |
int counter = 0; | |
while(counter < 10) { | |
Serial.println(counter); | |
counter++; | |
} | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment