Quote Originally Posted by dmairspotter
If I understand your desired function correctly, maybe this idea?

counter var byte ' a counter for the alarm condition

you might have to add a little code to prevent counter from rolling over to 0, depending on your application.

This should force the alarm on after 15 continuous seconds of low range condition., and turn the alarm off immediately that the range exceeds 15
thanx dmairpotter...