11/27/2023 0 Comments Arduino delay alternative![]() The value of this counter variable can be used to determine if a certain amount of time has elapsed. Most API functions never delay() or block (unless otherwise stated) Supports 2, 3 and 4 wire steppers, plus 3 and 4 wire half steppers. That means, your application code is interrupted every millisecond for a very short amount of time to increment the counter. For example, the millis() function increments a global counter variable when a timer is overflown every millisecond. These functions are implemented using timer-based interrupts. So what is a better alternative? What if we could do other things while we wait for a delay time to elapse? Some of you might already know to implement this using millis() or micros() functions. How to write non-blocking code with ptScheduler?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |