Added ultrasonic sensor distance control