Switch to full style
Understanding the language, error messages, etc.
Post a reply

Re: Initialize random numbers generator

Thu May 22, 2014 10:28 am

Mmh, I will include a random seed picker function in the library, that's a good idea.

Re: Initialize random numbers generator

Thu May 22, 2014 3:24 pm

Image

Re: Initialize random numbers generator

Wed May 28, 2014 5:32 pm

Hey guys,
I just added a new pickRandomSeed() function which should be called just after gb.begin();
It's a mix of the battery voltage, the ambiant light and the time elapsed, which depends on how long does the user take to press 'A' to skip the start menu. It works fine with the emulator.
Here is what it does:
Code:
randomSeed(battery.voltage * ~micros() + backlight.ambientLight + micros());

As there is a multiplication of 2 pretty large numbers it should overflow several times and give a random random seed ("random random", haha).

Re: Initialize random numbers generator

Fri Jun 20, 2014 8:40 am

Just saw this, thanks a lot !

Re: Initialize random numbers generator

Fri Oct 06, 2017 5:31 pm

You can try portable generators because using best portable generator is the best option generatorsideas.com
Post a reply