#include <LiquidCrystal_I2C.h>
// Initialisation de l'écran LCD
//SDA -->pin A4 SCL--> pin A5
LiquidCrystal_I2C lcd(0x27, 16, 2);
int s = 0;
void setup() {
lcd.init();
lcd.print("Simple compteur..");
Serial.begin(9600);
Serial.println("Test simple pour un LCD I2C");
}
void loop() {
// Afficher le temps sur l'écran LCD
lcd.setCursor(5, 1);
lcd.print(s);
if (s<60)
{s=s+1;
}
else
{
lcd.clear();
lcd.print("Simple compteur..");
s=0;
}
delay(200);
}