Autonomous vehicle using dc motors and servo

I'm a sixteen year old kid and trying to build an autonomous car that will go around an outside running track. I need help to write the script to make the two dc motors constantly run while the servo provides direction for the car. Any help would be much appreciated.

I need help to write the script to make the two dc motors constantly run while the servo provides direction for the car.

How are the motors connected to the Arduino? How are they powered?

How will the servo provide direction? Will it be waving a baton like a conductor?

The motors and servo will be connected through a motor shield. The shield will be connected to an external battery source.

My goal is not to use sensors, and not to follow the white line of the track. My intention is for the code to run the two dc motors and tell the servo what degrees to turn.

For example, i would start the car at the first curve, and have the servo turn 10 degrees to the left. When the car reaches the end of the first curve in a certain amount of time, the servo will go back to its original position to go on the straight part of the track. The car would repeat the same thing for the last curve and the last straight part. I intend to use the inside lane of the track.

The motors and servo will be connected through a motor shield.

Which one?

Turning a pin on or off controls the direction of a motor. Which pin? Which motor?

Using analogWrite() on a pin controls the speed of a motor. Which pin? Which motor?

Typically, you have the two motors spin in opposite directions.

For example, i would start the car at the first curve, and have the servo turn 10 degrees to the left. When the car reaches the end of the first curve in a certain amount of time, the servo will go back to its original position to go on the straight part of the track. The car would repeat the same thing for the last curve and the last straight part.

So, you turn the motors on. The rest of the control is simply turning the servo at the right time.

Turning the servo based only on time is a good way to get someone hurt. You REALLY need some feedback.

My goal is not to use sensors, and not to follow the white line of the track. My intention is for the code to run the two dc motors and tell the servo what degrees to turn.

It seems unlikely to me that this plan will possibly work.

You need the vehicle to go straight for about 100 metres, and then turn left for about 100 metres, and then go straight again, and then turn left again.

Even with wheel encoders to measure the distance, and even if you carefully match the speed of the two motors, it's not going to work. It will wander about, all over the infield.

Even if you get the turn speed sorted so that it goes round the curve under ideal conditions, the slightest change and it will get lost. One wheel slips a little, it'll turn in or out. Tiny bump in the road and it'll get mis-directed. You put it down to start and it's a gnat's whisker misaligned, it's off course right out the blocks.

I'm with the other posters above: you're doomed without some kind of feedback....

edit... Harsh as that may sound, you're better off knowing that now than in a few weeks when you've spent hours of time on something that won't work. Especially if it's a school project (is it?) and you have a hand-in deadline, far better to spend the limited time more wisely.

You could get a gps module. Probably the best solution if your specific goal is to travel around an athletics track.