Check out the use of encoders on the wheels for distance and running in a straight line, that would be my first choice. Just write your programs for each distance and load the one you need, this would be easier than trying to input a distance at run time.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen