Created
November 6, 2016 12:48
-
-
Save lazytomatolab/d8f37e28c2667ad36250405f2ecbab00 to your computer and use it in GitHub Desktop.
【Arduino SpeedUp】快速上手 Class 5 - 麵包板是什麼?好吃嗎?更多資訊請造訪: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); | |
} | |
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
thank you