Random Integer Problem

  • I'm trying to generate a new random number every time the unit gets reset/rebooted but it always returns the same number, 6 in this case. Any thoughts on how this could be done? Is it a bug in Random Integer? It will be running on an ATOM Lite (testing on a Core2 so I see it on screen)


  • According to https://xkcd.com/221/ the random number should be 4 :-)
    In reality a randomizer will just be an algorithm to create numbers and often they get initialized by a timer. So if you always start the same code after reset and read the number it seems to met always the same initialisation. I miss a function to "randomize" the initialisation. Try to do it by any loop/function before that delays in a random way e.g. connection to wifi or read from a noisy AD channel until a specific value is read.