Language | Libraries | Comparison
This allows you to place a variable into your random number generator, which helps it to generate "random" numbers. There are a variety of different variables you can use in this function. Commonly used are current time values (using millis() ), but you could also try something else like user intervention on a switch or antennae noise through an analog pin.
long, int - pass a number to generate the seed.
no returns
long randNumber;
void setup(){
Serial.begin(19200);
}
void loop(){
randomSeed(analogRead(0));
randNumber = random(300);
Serial.println(randNumber);
}
Corrections, suggestions, and new documentation should be posted to the Forum.