So i'm very much a newb at coding and I have a very unique situation that I'm trying to figure out. Basically trying to create a speed trap by using 2 laser trip wires over a set distance. Trying to start a timer based on the first photoresistor going low, and then stopping when the second laser trip wire is triggered, then pass that time count into a formula to get a speed. Problem is that it may not always be that the second trip wire gets triggered, so I need to restart the counter/timer if the first trip wire is triggered again without hitting the second trip wire. Reasoning is that this will be on a foosball table and the second trigger will be in the goal, thus the reasoning that the second trigger may not always be triggered before the first one gets triggered again.
Just cant think of a good way to break a for or while loop based on the laser trip wire going low...starting is easy...restarting it is proving for me to be difficult.