random timer, need help
mike mocenter
Posts: 4
i am in need of some help with firmware for a BS2.· I need to make a random timer to hold a pin high for a time period of 1 - 20 seconds (random) when another pin goes high.· the output will eventually play a recorded music on a sound module for a game for the random period of time.··Once the music finishes, another pin goes high.·· after that,·the timer is reset to start again.· would appreciate any help with the timer.·thanks
Comments
' timeLimit is the random time limit in units of 100ms
' If you use a time tick of 100ms, you can use bytes for the variables
FOR timePassed = 1 to timeLimit
PAUSE 100 ' milliseconds
NEXT