Missing pulse detector misses pulse!

Make sure the digital input pin is HIGH before calling pulseIn(pin, LOW).

Otherwise it may not measure the pulse width correctly.