stopwatch
vla7
Posts: 79
I am building a lap timer for a radio control car track. It will basically consist of an IR emitter and receiver. Every time the car passes where the emitter and receiver line up it will block the signal therefore changing the state of the receiver. Is there a way to have the basic stamp keep track in seconds how long it takes the receiver to go from a 1 to 0 to a 1 again (therefore the car having completed one lap). I'm not concerned about precision more than I am concerned with consistency. In fact I could live with it being a few seconds off so long that it is consistent.
Thank You, any help would be greatly appreciated.
vla7
Thank You, any help would be greatly appreciated.
vla7
Comments
counter = 0
do
pause 950
counter = counter + 1
loop until in0 = 1
debug "It took ", dec counter, " seconds for the Boe-Bot to complete one lap."