Microsecond Delays
Overview
In addition to the standard delay function which is measured in milliseconds, there is also a microsecond delay measured in, you guessed it, microseconds. Up until now, you have not needed shorter delays in your projects, but as you start creating frequencies to make sounds, shorter delays will be helpful.
delayMicroseconds(300); // Note that for every millisecond there are 1000 microseconds.
Exercise:
Complete the following table in your notebook.
Seconds |
Milliseconds |
Microseconds |
---|---|---|
.3 |
||
45 |
||
.020 |
||
2350 |
What function would you write if you needed a .02 millisecond delay in your code? Write your answer in your note book.
TEACHER CHECK ____