Skip to content

Instantly share code, notes, and snippets.

@lazytomatolab
Last active August 7, 2019 04:03
Show Gist options
  • Save lazytomatolab/8fd0a0a5d13416ec482264f9e1e706d6 to your computer and use it in GitHub Desktop.
Save lazytomatolab/8fd0a0a5d13416ec482264f9e1e706d6 to your computer and use it in GitHub Desktop.
【Arduino SpeedUp】快速上手 Class 14 - 迴圈 while 稱霸 Arduino!更多資訊請造訪:http://www.lazytomatolab.com
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() {
}
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