#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
lcd.init();
lcd.backlight();
lcd.setCursor(1, 0);
lcd.print("HELLO PROF");
pinMode(3, INPUT_PULLUP);
pinMode(4, OUTPUT);
}
void loop() {
if (digitalRead(3) == LOW)
{
lcd.setCursor(0, 1);
lcd.print("LED EST ALLUMEE");
digitalWrite(4, HIGH);
}
else
{
lcd.setCursor(0, 1);
lcd.print("LED EST ETEINTE");
digitalWrite(4, LOW);
}
}