2 Replies Latest reply on Feb 12, 2014 10:18 AM by rmm200

    Missing randomSeed() and changed random()


      It's appear that Arduino randomSeed() doesn't exists anymore in Arduino IDE 1.5, and random() is different from Arduino docs. For example, if I need to generate random numbers, I need to generate a number with random() and then use % and some math to get a number in range I need.


      Is it a bug?


      PS: my platform is Linux 64bit

        • 1. Re: Missing randomSeed() and changed random()

          OK - this one bothers me more than it should. I understand library problems with Galileo timing, and missing AVR headers (different architecture), but you don't go changing the Arduino language for no good reason.

          There is no reason for the Galileo implementation of random (and randomSeed) to be different from Arduino 1.05.

          • 2. Re: Missing randomSeed() and changed random()

            After a bit more research - this looks more like a sin of omission - not commission.

            Intel did not provide a random or randomSeed, so the posix definition from stdlib took over.

            Back to being not bothered - just add it to the bug list... We really need a conforming implementation of all Arduino functions.