This Arduino sketch addresses a known problem with low-cost knock-off HC-SR04 ultrasonic distance sensors. These sensors-when they encounter out of range distances-get stuck and only return zero. This sketch will try 3 times to reset the sensor, if the value is still zero the sketch returns "out of range", else, the distance in centimeters and inches are returned.