![]() ![]() The minimum duration for delay() is 1 millisecond, so if you need to sleep for only 400 microseconds, here you have a new solution. With delayMicroseconds() you can provide a number of microseconds to sleep. If you need to be more precise you may have to use the delayMicroseconds() function. Take the number of minutes, multiply it by 60 to get the number of seconds, and then multiply it by 1000 to get the number of milliseconds.Įx: delay(3 * 60 * 1000) will make the program sleep for 3 minutes. If you want to make your Arduino sleep for 1 minute, or for multiple minutes, then it’s quite easy. So, if you think in seconds, then multiply the number by 1000 and you have the value you need. The delay() function expects you to give a number of milliseconds – not seconds – to sleep. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |