Delay without Delay()?

cpjfox:
Ahhhh, so the chip counts the number of states and it applies a number to each one for you?

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");
}