What is the easiest way to run some code each millisecond for a certain amount of time?

This is PC thinking. Most Arduino code runs the processor at full speed and constantly. It doesn't matter whether the CPU is calculating the figures of PI, or sitting in a loop twiddling its thumbs. The power dissipation doesn't change.

Power management is available but requires programming tricks.

1 Like