2 ms·
The Arduino is a single-threaded microcontroller running a single code loop, plus interrupts. delayMicroseconds is a busy-wait loop, so is relatively precise (
by mcpherrinm 3y ago
The Arduino is a single-threaded microcontroller running a single code loop, plus interrupts.
delayMicroseconds is a busy-wait loop, so is relatively precise (to within a few instruction's execution time.
However, interrupts can happen during that sleep, and the time spent handling interrupts won't be accounted for properly.
It isn't a real real-time system, but for a project like this, it'll be good enough.