Next question...
I'm trying to generate a random number between X and Y...
The only command I see is:
Random Var
And the manual says it generates numbers up to 65,000
Is there a way to reign this bugger in a bit?
Next question...
I'm trying to generate a random number between X and Y...
The only command I see is:
Random Var
And the manual says it generates numbers up to 65,000
Is there a way to reign this bugger in a bit?
www.theLanguageBear.com - Multi-Lingual books for kids and adults of all skill levels.
That's what I've got going now...
Randomizer:
RANDOM rand
high 3 : pause 10 'Blinks an LED once per random number generated
low 3 : pause 10
IF rand > 100 THEN Randomizer
IF rand < 1 THEN Randomizer
but the "random" numbers just seem to get larger and larger. After rand > 100 it just goes into a vicious blinking cycle, never to return.
www.theLanguageBear.com - Multi-Lingual books for kids and adults of all skill levels.
Or use a 16 timer value as a seed the first time, or use an external clock, or this, or that.
It's been discussed here numerous times on how to get truly random numbers and best answer so far is to seed the randomizer with a truly random event such as a user input which, most likely, could never be exactly the same every time.
Bookmarks