This has been a frustrating problem for a while. I have ran several different sketches all resulting in the failure of the motors to run, with the exception of one sketch. With this sketch the robots doesn’t change direction when an obstacle is encountered. The ultrasonic sensor and servos functionality has been verified. I appreciate any help from the community, perhaps someone has an explanation as to why the motors run in the one sketch, but not the other,
delay(100); //Pause the program for half a second to let the robot turn
Comments that don't describe the code accurately are just noise.
RightDistance = distance; //Set the variable RightDistance to the distance on the rightComments that just repeat what the code says are also simply noise.