Need simple timer/stopwatch sketch
hello,
i need simple timer or stopwatch sketch.
i have uno.
i going use 2 photoelectric sensors , need basic simple sketch start timer when first 1 tripped , turn timer off when second 1 reached. displayed in seconds , minutes. i have reset button start over. read on digital readout, know how that.
any appreciated.
thanks,
tony
i need simple timer or stopwatch sketch.
i have uno.
i going use 2 photoelectric sensors , need basic simple sketch start timer when first 1 tripped , turn timer off when second 1 reached. displayed in seconds , minutes. i have reset button start over. read on digital readout, know how that.
any appreciated.
thanks,
tony
the same question asked in forum few days ago.
is school assignment?
check this link - may you'll find 1 of classmate...
build code doing this:
in plain english it's
stage = waiting // start if detector1 goes above below threshold
loop
read both detectors , button.
if button pressed set stage waiting
else
if detector 1 above threshold , stage waiting set stage starting
if detector1 below threshold , stage starting then
record start time , set stage measuring
if detector2 below threshold , stage measuring then
done. display duration (current time - start time). stage goes waiting.
if stage measuring display current time - starttime in lcd // live view slow measure precision
is school assignment?
check this link - may you'll find 1 of classmate...
build code doing this:
in plain english it's
stage = waiting // start if detector1 goes above below threshold
loop
read both detectors , button.
if button pressed set stage waiting
else
if detector 1 above threshold , stage waiting set stage starting
if detector1 below threshold , stage starting then
record start time , set stage measuring
if detector2 below threshold , stage measuring then
done. display duration (current time - start time). stage goes waiting.
if stage measuring display current time - starttime in lcd // live view slow measure precision
Arduino Forum > Using Arduino > Project Guidance > Need simple timer/stopwatch sketch
arduino
Comments
Post a Comment