Mr. Richard
01-24-2007, 08:52 AM
I am trying to add a random timing event to a code for a BS2. I am sure that this is well documented, but I could not find it.
Is there a way to create a random number for a counter? I would like to randomize a pause before an event (pause 1-5 seconds then high X) How do I use a random number in a loop?
Thanks for the help
Josh
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Magic Smoke Theory of Electronics –
Inside every electronic part there is magic smoke.
The magic smoke is what makes everything work.
If you release the magic smoke, the part stops working!
Is there a way to create a random number for a counter? I would like to randomize a pause before an event (pause 1-5 seconds then high X) How do I use a random number in a loop?
Thanks for the help
Josh
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Magic Smoke Theory of Electronics –
Inside every electronic part there is magic smoke.
The magic smoke is what makes everything work.
If you release the magic smoke, the part stops working!