#include <LiquidCrystal.h>
#define LCD_RS 0
#define LCD_EN 1
#define LCD_D4 3
#define LCD_D5 4
#define LCD_D6 5
#define LCD_D7 6
LiquidCrystal lcd(LCD_RS, LCD_EN, LCD_D4, LCD_D5, LCD_D6, LCD_D7);
int i;
const int potPin=26;
int potValue=0;
void setup() {
lcd.begin(16, 2); //cinfiguracion de display de 16x2
lcd.clear();
lcd.setCursor(6,0);
lcd.print("LCD");
//Serial1.begin(115200);
analogReadResolution(12);//12 bits para el ADC es por esto que se define
//una resolucion de 12 bits
delay(2000);
}
void loop() {
lcd.setCursor(4,1);
lcd.print("EJEMPLO ");
potValue =analogRead(potPin);
//Serial1.println(potValue);
lcd.print(potValue);
delay(1000);
lcd.clear();
//lcd.print(i);
// i++;
}