Generating True Random with BS2
IceFirePro
Posts: 86
Hi everyone,
I am just starting off with my new BS2 and I have this question:
As I see, the RANDOM command in PB 2.5 is not real; it results in a particular number based on the seed, and if the seed is the same, the "random" number is the same. Pretty frustrating, isn't it?
Question: How to generate a true random number without user input? Is there a way to access Windows clock and go from there as a seed, or the system timer? Or use the photo-resistor, another sensor?
Thanks in advance!
I am just starting off with my new BS2 and I have this question:
As I see, the RANDOM command in PB 2.5 is not real; it results in a particular number based on the seed, and if the seed is the same, the "random" number is the same. Pretty frustrating, isn't it?
Question: How to generate a true random number without user input? Is there a way to access Windows clock and go from there as a seed, or the system timer? Or use the photo-resistor, another sensor?
Thanks in advance!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
A = TIMER
That gives you a floating point number of two?? decimal precision..... You'll need to make that an integer to directly send it across the serial port.
A = INT(TIMER)
OPEN ...... COM1, baud, blah, blah, and send "A"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.