I have read many posts on here about controlling the HDMI display or turning off the backlight or other such with a screensaver.
I have a different need. I am retrofitting a vending machine for our school and giving it a web interface and touch screen. The touch screen is one of those 5inch ones with HDMI and USB (for power and touch).
But I am not looking to control the backlight on the screen.
What I need is a way to just trigger a GPIO pin, either high or low when the screensaver activates. I have LED lighting that I put in the machine to illuminate the items inside, but I want the lights to go off when the Pi goes into screensaver. I already have a relay board in there to control the vending motors and have a relay or two extra and thought if I could activate the GPIO with screensaver, I could make the lights go off when the screensaver activates.
The screensaver will actually display pictures and other stuff from around the school when active and when a student touches the screen, the screensaver will go off and the lights need to come on. That is the purpose. Then when the student walks away, the screensaver waits the allotted time and comes on and turns the lights off.
Does anyone know of an effective (and easy, hopefully) way of triggering a GPIO with the screensaver?
Thank you in advance for any direction!