Here's some newbie advice: To Blink WITH or WITHOUT delay()?

There's always talk of the advantage of delay-less blinking, but I don't recall ever seeing any output posted which proves exactly what the problem with using delay is. The serial monitor output below, vividly shows how the use of delay() blocks other stuff from happening.

The sketches below are slightly modified versions of the Blink and BlinkWithoutDelay sketches. They differ from the originals in that a pin is set as an input and read at the end of loop(). The state the pin is printed to the monitor, along with the value of millis() at which the read took place.

You can see from the output, that with delay(), those switch reads are separated (in my example) by 20 seconds, since the led is on and off for 10 seconds each. If the delay() was longer, then of course the reads are further apart and that could have disasterous results in real life.

Without delay(), the reads are under 10ms apart, no matter what value you choose for the led on/off time.

You can run these without an actual button (or the el-cheapo alternative, a piece of wire), but the effect is more dramatic when you see how far apart the changes are with delay() compared to without delay()'s almost instantaneous effect when you click the button.

  Blink WITH DELAY with a digitalRead() at the end of loop()
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
int button = 8; //we'll pretend there's a button here, to read each time through loop(
int ledInterval=10000;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);   
  pinMode (button, INPUT_PULLUP); 
  Serial.println("Starting  Blink with Delay().....");

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(ledInterval);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(ledInterval);               // wait for a second
  //now read and print the state of our button
  //   observe in the monitor that these are very close to each other

  Serial.print(" ");
Starting  Blink with Delay().....
1 19999
1 40000
/* Blink WITHOUT DELAY with a digitalRead() at the end of loop()

 Turns on and off a light emitting diode(LED) connected to a digital  
 pin, without using the delay() function.  This means that other code
 can run at the same time without being interrupted by the LED code.

 The circuit:
 * LED attached from pin 13 to ground.
 * Note: on most Arduinos, there is already an LED on the board
 that's attached to pin 13, so no hardware is needed for this example.

 created 2005
 by David A. Mellis
 modified 8 Feb 2010
 by Paul Stoffregen

 This example code is in the public domain.

// constants won't change. Used here to 
// set pin numbers:
const int ledPin =  13;      // the number of the LED pin
int button = 8;  //we'll pretend there's a button here, to read each time through loop()

// Variables will change:
int ledState = LOW;             // ledState used to set the LED
long previousMillis = 0;        // will store last time LED was updated

// the follow variables is a long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long interval = 10000;           // interval at which to blink (milliseconds)

void setup() {
  // set the digital pin as output:
  pinMode(ledPin, OUTPUT);  
  pinMode (button, INPUT_PULLUP); 
  Serial.println("Starting Blink without Delay()....."); 

void loop()
  // here is where you'd put code that needs to be running all the time.

  // check to see if it's time to blink the LED; that is, if the 
  // difference between the current time and last time you blinked 
  // the LED is bigger than the interval at which you want to 
  // blink the LED.
  unsigned long currentMillis = millis();

  if(currentMillis - previousMillis > interval) {
    // save the last time you blinked the LED 
    previousMillis = currentMillis;   

    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW)
      ledState = HIGH;
      ledState = LOW;

    // set the LED with the ledState of the variable:
    digitalWrite(ledPin, ledState);
  //now read and print the state of our button
  //   observe in the monitor that these are very close to each other

  Serial.print(" ");
1 2684
1 2693
1 2701
1 2709
1 2717
1 2726
1 2735

Now do the same thing but with one led blinking every 250ms and another blinking every 1000ms and you'll see the problem with delay.

The advantage of BWoD is that you can put other stuff in that loop and it will all continue to run. While blinking one led is all you do, the two are equivalent. But as soon as you add doing any one other thing you'll see the issue with delay.

Yes D_G that's the point I was making; wasn't asking was giving advice.

Changed the subject to make that clearer....

OK, you confused me because I thought you were asking. I answered before I looked at the user name, then I thought, "Hey, that guy knows this. What gives?"

Some concrete evidence of the problem would help....