Hi,
I hooked 3 pots(100k each) to pins (A0, A1, A2) in my Arduino UNO (Rev 3).
I want to map() each pot value to a LCD. I'm using the 3-wire (595 shift register) with the lcd.
The problem is I got very messy readings from the pots. Sometimes in the middle position of pot A1 the LCD is showing 987...I never get 0 - 255 exactly.
Here part of my code
void loop ()
{
iLCD.home ();
currentColorValueRed = analogRead(redPotPin);
delay(2);
currentColorValueBlue = analogRead(bluePotPin);
delay(2);
currentColorValueGreen = analogRead(greenPotPin);
delay(2);
iLCD.print("R:");
iLCD.print(map(currentColorValueRed, 0, 1023, 0, 255 ));
iLCD.setCursor(5, 0);
iLCD.print("G:");
iLCD.print(map(currentColorValueGreen, 0, 1023, 0, 255 ));
iLCD.setCursor(10, 0);
iLCD.print("B:");
iLCD.print(map(currentColorValueBlue, 0, 1023, 0, 255 ));
}