I'm considering a backlight timer and am just wondering if there is an easier or better way?
I thought of using two variables: my desired backlight duration and backlight timestamp.
In my loop, I check if (millis - timestamp > duration), send the command to turn backlight off.
The next time through the loop, the condition is still true, so the backlight is sent a redundant "off" command.
My solution is to create a 3rd boolean variable flag and change my if condition to (millis - timestamp > duration && flag)
When I touch a control, the command to turn backlight on is sent, flag = false, timestamp = millis.