Hi folks, the PING))) ultrasonic range finder measures distances from 3cm to 3meters. But I`d have to limit its range from 3cm to 60cm. Thus I want the program to wait for a maximum duration of 3496 microseconds (=60cm) before automatically going LOW again. How could I start a timecount in microseconds each time the PING))) goes HIGH??? This would allow me to go LOW after the desired duration.
As far as I
m concerned *pulseIn(pin, HIGH)* wont work, as pulseIn() waits for the pin to go HIGH, starts timing, then waits for the pin to go LOW and stops timing. So untouched it always outputs the sensor's maximum range, as it needs an echo to stop timing and else gives the sensor's maximum range.