helper for ultrasonic hc_sr04 impl