Hey guys, I thought I would drop by here for help.
I am writing a program where I need to generate a random set of lest say 50 numbers from 8 to 11, and have a new set of 50 if I restart the program, or some condition is not met.
Here is part of my code that generates a random set of 50.
while(i<=49){
ledB*=random(8,12);*
i++;* } The problem is that when I restart the program, I get an identical set of 50 AGAIN. But what I need is a new set of 50. If the function random(min,max) is not random what is it used for? Thank you
That reference shows using a analogRead on an unconnected analog pin to get a different seed number for each startup of the program. There is a active posting around here on trying to find a better source for a seed number that is truly random, check it out.