Device for sensing distance via ultrasound