The while stays in its loop until the end condition is met.
The if checks, performs, goes to the top of loop, checks, performs, etc.
while will appear to be stuck in the loop, the if will let other things occur.
think delay vs blink-without-delay
The while stays in its loop until the end condition is met.
The if checks, performs, goes to the top of loop, checks, performs, etc.
while will appear to be stuck in the loop, the if will let other things occur.
think delay vs blink-without-delay