// 2009 mlab.uiah.fi/paja // Experiencing Random function long randomLong; void setup(){ Serial.begin(9600); // Random function on microcontrollers is not truely ramdom. The sequence of given numbers // are always the same. However, the sequence can be different if a unique number is added to the function. // Therefore randomSpeed function can add the external numbers using noises (random numbers) from analog pins. // Try this code with and without the randomSpeed. randomSeed(analogRead(0)); } void loop() { // print a random number from 10 to 19 // random function return long datatype. randomLong = random(100, 200); Serial.println(randomLong); delay(1000); }