Last active
February 12, 2016 18:56
-
-
Save ZiTAL/3c54be6310e57c90aed6 to your computer and use it in GitHub Desktop.
arduino: wait, function to replace delay
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
// delay function stops arduino X miliseconds, wait simply wait... :D | |
// i: miliseconds | |
void wait(int i) | |
{ | |
long time = millis()+i; | |
while(millis()<time) | |
{ | |
// do... nothing :) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment