NRF24L01 example code with Arduino Uno and OpenCM

dbgi has some more code that is genious! It is a brilliant idea proposed by user
Coding_Badly So his username is self-ironic

a do - while -loop with a fixed condition "false"

At first view this seems to be nonsense a do-while-loop where the condition always evaluates to "false" means
run down the code only once

so why not leave away the do-while-loop???

The purpose of adding the while-loop is it makes the variable intervalStartTime
local to the while-loop

This has the effect that with mutliples calls of macro dbgi
the always the same named variable intervalStartTime are each local and don't disturb each other.

This means the macro dbgi can be called at thousands different places in the code where each call has its own set of variables.

1 Like