Don't forget that you have other commands between the delays (digitalWrite, jump to start of the loop).
I think it's better to use a timer controlled interrupt to get a really precise time resolution.
Don't forget that you have other commands between the delays (digitalWrite, jump to start of the loop).
I think it's better to use a timer controlled interrupt to get a really precise time resolution.