Christmas Projects Assortment

Sorry again. I forgot to say how it works. (oops!)
[smiley=huh.gif] [smiley=huh.gif] [smiley=huh.gif]

A random number is generated between 15 and 500.
Pin 2 is set high.
(Pin 2 turns on a transistor, turning on the LEDs.)
The random number is used as a delay time.
Pin 2 is set low.
A new random number is made.
The random number is used as a delay time.
The cycle starts again.

The code is here:

int delayVal;
const int ledpin = 2;

void setup(){
pinMode(ledpin, OUTPUT);
}

void loop(){
randomSeed(analogRead(A0));
delayVal = random(15, 500);
digitalWrite(ledpin, HIGH);
delay(delayVal);
delayVal = random(15, 500);
digitalWrite(ledpin, LOW);
delay(delayVal);
}