delay on new arduino

Hello, I just received my Uno. Tried out the blinking LED sketch....and it stays on the first digitalWrite in the loop....
Next I tried the LED blink with out delay sketch, and that works fine. Anyone hear of this before?

Are you using linux? It is a bug in bintools (or another part of the avr toolchain.)

Add Serial.begin(9600); to setup().
--or--
Declare a Global variable and use it in the sketch somewhere (like "int LEDpin = 13"). You have to use it in the sketch so that the complier doesn't optimize it out. (You can't just do "nothing with it" the complier is smarter than that.)

e.g.:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

int LEDpin = 13;

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(LEDpin, OUTPUT);     
}

void loop() {
  digitalWrite(LEDpin, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(LEDpin, LOW);    // set the LED off
  delay(1000);              // wait for a second
}

For lengthu discussion and what tools you need to update in your toolchain, see here:

Yup! That fixed the problem. Thanks a lot!