Random function (by Alfredo)
Hi guys.
I need help.
I would like to do a random function for 5 outputs, it means "raffle"
I would like that the output keep 5 seconds Hi, and turn to Low , after it random again a new one output.
I have no idea how it's possible
Could you please help me
(no subject) (by Jonathan Westhues)
LDmicro doesn't have a random number generator built in, but you can code one, as attached. This implements a "multiplicative linear congruential generator" with period 508, terrible by any normal mathematical standard but maybe good enough for a toy. A better algorithm could be implemented but would be more complex.