// Breno Correia Lociks
// Exercício 1
#include <LiquidCrystal_I2C.h>
#define pot 34
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.setBacklight(HIGH);
lcd.print("Pot = ");
}
void loop() {
int potLeitura = analogRead(pot);
lcd.setCursor(6, 0);
lcd.print(potLeitura);
if(potLeitura < 1000) {
lcd.setCursor(9, 0);
lcd.print(" ");
}
if(potLeitura < 100) {
lcd.setCursor(8, 0);
lcd.print(" ");
}
if(potLeitura < 10) {
lcd.setCursor(7, 0);
lcd.print(" ");
}
}