The PulseIn is blocking, it polls until line is changed.
you should think of a rewrite of pulseIn() using pinchange interrupts.
Not trivial but doable.
The PulseIn is blocking, it polls until line is changed.
you should think of a rewrite of pulseIn() using pinchange interrupts.
Not trivial but doable.