02-03-2021 10:23 PM
Hi,
I want to do an application where an operator will see a light turn on if a random number generator outputs a number equal or greater than 95. The problem is that I would like the light to stay on even though the random number generator goes below 95. I just cannot seem to wrap my head around it... Any ideas?
Thank you
Solved! Go to Solution.
02-04-2021 12:04 AM
Shift Register. When the boolean goes true, you store that true value in a shift register for future iterations. You can OR the value coming from the comparison with the value from the shift register and put that back into the shift register. Just remember to initialize the shift register to False at the beginning of the program.