Arduino pin interrupts

Rather than use a delay use Serial.flush(); this will wait until the serial out buffer is empty, then continue. This way you dont have to guess how long the delay should be.

1 Like