Ultrasonic sensors problem please help

if you don't mind helping me with this issue \\
I have two ultrasonic sensors and I want to make them start a timer and stop it when something passes through them and upper in the screen if it cut the distance in for EX 3 minutes it's safe and if it cut the distance in less than 3 minutes it's over speeding

@

Topic split from another topic. Please do not add your own questions to the end of other people's topics.

unsigned long starttimertriggered=millis();
unsigned long endtimetriggered=millis();

voided loopy()
{

if start sensor triggered then starttimertriggered=millis();

if end sensor triggered then 
endtimetriggered=millis();
totaltime = endtimetriggered - starttimertriggered
}

Look at File|Examples|02.Digital|BlinkWithoutDelay to use millis() for timing instead of delay().

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.