Random number seed

IF -- and that's a capital IF -- your application receives input at an unpredictable amount of time after it starts up, then millis() can be an excellent seed for random(). For example, I have a little toy I made for my son. To play, he plugs it in, and anytime after the several seconds of startup stuff is finished, he presses a button indicating he wants to play. I use the value of millis() to seed the random() at that time.

The advantage is that the range of possible seed values is several thousand (or possibly much more depending on when he pushes the button) compared to the maximum of 1024 that you could get in theory -- in practice much less -- from analogRead. The microsecond counter might be much better.

However, this technique might not be appropriate for your application. It certainly would NOT be appropriate to use millis() at some fixed point in your setup() function.

I've often thought that analogReading two different pins and combining their values might be an improvement, but I have never tried this:

 long seed = analogRead(pin1) + 1024 * analogRead(pin2);

Mikal