#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

int botao =A1;
int valor;

void setup()
{
  lcd.init();                      // initialize the lcd
  // Print a message to the LCD.
  lcd.backlight();
  lcd.setCursor(1,0);
  lcd.print("Hello, world!");
  
  

 Serial.begin(9600); 
pinMode(botao, INPUT);


}

void loop()
{
  
  valor = analogRead(botao);
  valor = map(valor,0,1023,0,255);


Serial.println(valor);

  lcd.setCursor(1,1);
lcd.print("Potenc:");
  lcd.setCursor(9,1);
lcd.print(valor);
 
  
  
  
  delay(200);
}