Quite Random (ver. 1.0.0)
This extension adds a command block to the mBlock environment to generate at least "quite" random number. The standard
Random() function for the Arduino module generates pseudo random numbers. This often results in the same numbers being generated over and over again when the Arduino module is turned on.
In real life we need to generate at least "quite" random numbers, for example, to play games.
- This block can be inserted into a command block where it is necessary to use a random number in the specified interval
(NOTE: including the specified limits of the number interval!)
The following example shows the use of a block as a classic dice. The numbers 1–6 are repeatedly generated every 5 seconds.
And this is the real result!
The generated random numbers are output to the Serial Monitor: