#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C Schermo(0x27, 16, 2);
int Potenza;
int Percentuale;
void setup() {
// put your setup code here, to run once:
Schermo.init();
Schermo.setBacklight(HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
Potenza = analogRead(A0);
Schermo.setCursor(0,0);
Schermo.println(Potenza);
Percentuale = map(Potenza, 0, 1023, 0, 100);
Schermo.setCursor(0,1);
Schermo.print(Percentuale);
Schermo.println("%");
}