Hello !
I am currently testing some things with a LCD screen and a potentiometer.
However, there is a problem, the values displayed in the Serial monitor and on the LCD are not the same : for example, with 10 in the serial monitor, a 1089 is displayed on the LCD, or with a 975, a 9759 is displayed. I do not quite understand how it is possible...
Here is my code :
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
int Pot;
void setup() {
lcd.begin(16, 2);
lcd.print("Potentiometre");
Serial.begin(9600);
}
void loop() {
Pot = analogRead(A0);
lcd.setCursor(0, 1);
lcd.print(Pot);
delay(200);
Serial.println(Pot);
}
Thanks,
Leo