Skip to content

Instantly share code, notes, and snippets.

@lazytomatolab
Last active October 25, 2017 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazytomatolab/654e81cb2eec865da639b9d37d7c9aa6 to your computer and use it in GitHub Desktop.
Save lazytomatolab/654e81cb2eec865da639b9d37d7c9aa6 to your computer and use it in GitHub Desktop.
【Arduino SpeedUp】快速上手 Class 4 - 判斷式 if else 讓你操縱自如!更多資訊請造訪:http://www.lazytomatolab.com/
void setup() {
pinMode(7, INPUT);
pinMode(13, OUTPUT);
}
void loop() {
if(digitalRead(7) == HIGH){
digitalWrite(13, HIGH);
}
else{
digitalWrite(13, LOW);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment