making a rc car turn

I have a code that makes my rc car run autonomous and now i need a code to make it turn left or right. could someone help write this it would be greatly appreciated.

like this?

@cbhunter, please do not cross-post. Other thread removed.

could someone help write this

I could, if I had any idea what you are using to steer, if I had any idea when you want to steer, and if I had any idea how much you wanted to turn, and if I had any idea how to know when the car had turned enough. Since I know 0 of the 4 things I need to know, I'll have to pass on this opportunity to help you.

I'm steering a rc car. It is powered by a dc motor. needs to turn from 0-1m. And it needs to straighten out after about half a meter.

It is powered by a dc motor.

One? How does that enable steering? You need either two motors that can run at different speeds or steerable front wheels.

needs to turn from 0-1m.

I have no idea what that means. A vehicle turns through an angle, not along a distance.

And it needs to straighten out after about half a meter.

So, just barely nudge the steering wheel that you don't have. Travel for half a meter at some unknown speed. Then nudge the non-existent steering wheel back to center. Have I got that right?

I really don't know I ripped apart a rc car and the steering might be a servo then

then I have to make it turn 45 degrees.

First establish whether the steering is controlled by a servo or a motor. How many wires go to the device that moves the steering ?

Its two

I'm sorry that I'm not familiar with coding and how servos and the motors work but you guys are being a really big help it's for a competition on Saturday

cbhunter:
Its two

Then it is not a servo.
Forget the Arduino for now and put 3V directly across the terminals. Does it move the steering ? Reverse the polarity. Does it turn the other way ?

it's for a competition on Saturday

Don't get you hopes up.

How about posting your code that

makes my rc car run autonomous

cbhunter:
I'm sorry that I'm not familiar with coding and how servos and the motors work but you guys are being a really big help it's for a competition on Saturday

The final Saturday in March 2017, I hope.

You need to provide a huge amount of extra information if you want useful advice.

Are you using an Arduino to do anything with the car? If so, tell us all about it and post your program.

...R

I can't get to the car right now because I'm in school but I'm positive the front motor works

PinMode(9, OUTPUT);
DigitalWrite(9, HIGH);
Delay(1000);
DigitalWrite(9, LOW);

cbhunter:
I can't get to the car right now because I'm in school

How about focusing 100% on school while you are in school rather than sending all these 1 or 2 line Posts.

Then when you get home write a comprehensive description of your project so we all have much the same knowledge of it as you have.

...R

I don't know the information you guys need though that's why I'm sending these answers to your questions. And right now the code is powering the car to move forward

Got to be a troll.

gfvalvo:
Got to be a troll.

Yeah. He seems to be talking and not listening.

...R

No I'm 100% serious I really need help I'll take a pic of the car later to show what I have done