Hello everybody,
Today I have tried to connect a water pump with my Arduino Nano. The water pump works with a electricity of 1 to 6 volts. It is for this reason that I used an analog PIN to activate / deactivated .
What is my problem?
When i used the next code:
void loop() {
float voltage;
analogWrite(A5,255);
voltage = map(voltage, 0, 1023, 0, 255);
Serial.println(voltage);
}
The Analog PIN only returned 3.2/3.3 Volts. Is it normal?
Aditionally, I have changed the reference voltage for analog PINS without success ( Reference: analogReference() - Arduino Reference ):
analogReference(EXTERNAL);
Thanks for all!
Regards.