Last active
October 25, 2017 08:43
-
-
Save lazytomatolab/654e81cb2eec865da639b9d37d7c9aa6 to your computer and use it in GitHub Desktop.
【Arduino SpeedUp】快速上手 Class 4 - 判斷式 if else 讓你操縱自如!更多資訊請造訪: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); | |
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