Delay without Delay()?

Arrch:
What define does is it tells the preprocessor to find every instance of the the first value and replace it with the second value before it compiles. It's really just a text replacement command that occurs before the code is actually compiled. The chip doesn't even see the #defines. It's literal text replacement, so you have to be careful with it because this code:

#define i 0

would be very bad, because it would change this:

if (digitalRead(myPin) == HIGH) {

Serial.println("Hello");
}



to this:


0f (d0g0talRead(myP0n) == HIGH) {
  Ser0al.pr0ntln("Hello");
}

Uhhhhh. NO!
This is not the way the C preprocessor works.
It is not that simplistic. The substitution method described above would create all sorts of problems.
The C pre-processor tokenizes the text before substitutions.
A letter, like the "i" in the middle of a "function" name as in these examples
would not be substituted. Just like an "i" in the middle of literal quoted string would not be affected.
These examples are incorrect.

The code above is not affected in any way by the example #define of i to 0

See the gcc cpp documentation for further information:

look at sections 1.2 and 1.3 for details.

--- bill