added function to read distance via ultrasonic ping sensor