A good start would be to check if you can read the two inputs and display the values.Ok so what would the script or program look like for this to make it work
Code:
#define Potentiometer A0
#define Battery A1
void setup(){
Serial.begin(115200);
}
void loop(){
int32_t ADC;
ADC = analogRead(Potentiometer);
//change to mV
ADC*=5000;
ADC/=1024;
Serial.print("Value from pot = ");
Serial.println(ADC);
ADC = analogRead(Battery);
//change to mV
ADC*=5000;
ADC/=1024; //now 1/3 of actual battery voltage
ADC*=3;
Serial.print("Value from battery = ");
Serial.println(ADC);
delay(500);
}
The above should display the two voltages on the serial monitor.
If this works then we can look at turning the motor on.
Mike.