If you want to control the car from the PC via the Arduino you'll have to setup the serial port to receive the commands and output a PWM signal to emulate the potmeters.
I'm not really an Arduino man, but your code should look a bit like this. It receives + and - commands from the PC and increases or decreases the virtual potmeter position. Note that this is just a framework; there's no testing for minimum or maximum position, for instance.
const int analogOutPin = 9; // Analog output pin that the LED is attached to
int outputValue = 0; // value output to the PWM (analog out)
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
if ( Serial.available()) {
char ch = Serial.read();
switch(ch) {
case '+':
outputValue+;
break;
case '-':
outputValue-;
break;
}
}
// change the analog out value:
analogWrite(analogOutPin, outputValue);
}
Filter the output signal with an RC filter. This will give you a voltage between 0 V and 5 V. Measure the voltage range of the potmeters and report back. It's possible that you'll have to amplify the signal.
edit after the updated info in the question
Nice! So the potmeters give you an output range from 0 V to 5 V, which is exactly what the Arduino's output will do as well. So you can use the analogWrite
function like in the example code above. Note that the Arduino guys call it "analog", but the AVR doesn't have an analog output, so it's probably just PWM. The Arduino doesn't have an RC-filter to make it DC, so you'll have to add the resistor and capacitor yourself.
A value of 100 kΩ for the resistor, and 1 µF for the capacitor are probably OK.
edit after your measurements and comment
The arrows on the RC filter schematic indicate a voltage. The arrowhead points to the signal whose value you want to measure, the back end of the arrow to the reference you're measuring against, which is usually ground. So if you would connect the ground pin of a scope's probe to the lower connection, and the probe's tip to \$V_{IN}\$ you'd see the Arduino's PWM output. Probe at \$V_{OUT}\$ and the PWM will be averaged to a DC voltage with some ripple. That's what we want if we want to emulate the potmeters.
If I understand correctly the black and yellow wires carry the potmeters' values, and are referenced to the red wire, which is +5 V. (This is confusing; black is generally accepted to be ground!). You can look for ground on the PCB, but we can use the +5 V reference too, we'll just have to flip the filter upside down:
The top line is your red wire. \$V_{IN}\$ is the output from the Arduino, you have two of those. \$V_{OUT}\$ for one of those goes to the black wire, the other output to the yellow one.