Created
January 25, 2023 17:03
-
-
Save vlrmprjct/03c0880d5bfde470878fe9a12473a8eb to your computer and use it in GitHub Desktop.
Arduino
This file contains hidden or 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
boolean delayTime(unsigned long time) { | |
static unsigned long previousmillis = 0; | |
unsigned long currentmillis = millis(); | |
if (currentmillis - previousmillis >= time) { | |
previousmillis = currentmillis; | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment