Hello guys i want to control the lcd backlight with a push button when i press the button the backlight stays on for 30 sec then it turn of.I'm using a LCD1602 display with an i2c module
Something like this but when i take off my finger from the button the lcd backlight turns off , i want to stay on for 30 sec then turn off.
PS: i don't want to use delay function
Code:
if (buttonState == LOW) {
lcd.backlight();
}
else
lcd.noBacklight();
PS: i don't want to use delay function