![]() Blocking functions prevent a program from doing anything else until that particular task is completed. When you call delay(1000) your program stops on that line for 1 second. This number represents the time in milliseconds the program has to wait until moving on to the next line of code. The delay() function accepts a single int number as an argument. Instead of using a delay() function that blocks your code and doesn’t allow you to do anything else for a determined number of seconds, we’ll use a timer. We want the LED to stay on for a predetermined number of seconds after motion is detected. Introducing ESP8266 Timersįor this tutorial, we’ll use timers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |