I know there are a lot of threads on this and I have read them all along with other examples, but no matter what I try, on the Arduino Nano the analogRead function always returns 1023. To make it even more confusing I have another project using a Pro Mini that works great.
Here is the code:
#define ANL1 A1
void setup() {
Serial.begin(9600);
}
void loop() {
int av1 = analogRead(ANL1);
Serial.println(av1);
delay(1000);
}
I have a wire attached to pin A1. No matter if I put the other end on 5v, 3.3v or a resistor divider, the results are always 1023. Currently running the Nano on the USB voltage. Do I need external power? Is there some other setup steps that must be taken with the Nano that are unnecessary with the Pro-Mini?