You are reading a single comment by @Stevie and its replies. Click here to read the full conversation.
  • Ok, just added this - it'll be in the next release. The random number generator will automatically seed itself from the voltage reference at startup, or you can use E.hwRand() to get a random value from hardware, or E.srand(..) to seed Math.random

  • Very cool. I tested it and it works very nicely! Thanks very much! This way we have the best of both worlds.

    The only thing I might do differently is to let E.hwRand() return a long int. This way you would not get signed values back but always unsigned. Signed random values are a bit unusual I would say. But it does not really matter much.

    Being able to load C stuff directly would also be very cool. Although it is not too difficult to compile your own version - the documentation is very good...

About

Avatar for Stevie @Stevie started