I have a problem here, when I giving a dc voltage to A1, from 0v to 5v slowly and then use analogRead command to get values:
Serial.print(analogRead(A1)); // the values are correct 0V=0, 5V=1023.
char pin="A1"; analogRead(pin); // the values always 5-20% lower than analogRead(A1) return values, and not linear.
why and any suggestions?
Thank you very much.