You need to write code. You also need to know which way your robot is pointing so you can move it on a bearing.
You need to be able to read the position of your Arduino so you know when to stop.
This is not a beginners project, do something simpler with the robot while you learn how to code.