pulseIn() and Encoder library