Last active
July 3, 2016 04:01
-
-
Save taesamja/318eb3d4fc75cf5d289af477008f6db5 to your computer and use it in GitHub Desktop.
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
//millis()함수 사용 | |
long time = millis() ; | |
int flag = 1000; | |
void setup() { | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
if (millis() > time + flag) { | |
digitalWrite(13, HIGH) ; | |
} | |
if (millis() > time + 2*flag) { | |
time = millis() ; | |
digitalWrite(13, LOW) ; | |
} | |
} | |
//delay()함수 사용 | |
void setup() { | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(13, HIGH); | |
delay(1000); | |
digitalWrite(13, LOW); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
modified