Using a potentiometer I get the range 505 - 1023 instead of 0 - 1023. Very confused, unsure what could be wrong.
int analogReadValue;
void setup() {
Serial.begin(9600);
}
void loop() {
analogReadValue = analogRead(A1);
Serial.println(analogReadValue);
delay(500);
}
wvmarle
2
Probably your wiring. You seem to go from half to full voltage instead of starting at 0.
LarryD
3
Show us a good schematic of your circuit.
Show us a good image of your wiring.
Apart from checking the wiring as suggested by both the replies above, you should check the pot with your ohmmeter.
The resistance across wiper and one end should show a movement from 0 ohms to whatever the maximum resistance is as you turn it.