Make sure the digital input pin is HIGH before calling pulseIn(pin, LOW).
Otherwise it may not measure the pulse width correctly.
Make sure the digital input pin is HIGH before calling pulseIn(pin, LOW).
Otherwise it may not measure the pulse width correctly.