Ultrasonic sensor code suggestion

Taking advantage of the while-loop functionality to improve response of
ultrasonic sensor i.e. to have less delay in adjusting straightness of
robot.