veewee77
Posts: 1
Joined: Mon Jul 29, 2013 8:18 pm

Control GPIO with screensaver

Wed Mar 11, 2020 9:48 pm

Good day!
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!

VW

PhatFil
Posts: 1665
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Control GPIO with screensaver

Thu Mar 12, 2020 3:58 am

so your using the system desktop to provide the screensaver? for a vending machine handling real money in a school?

look at writing your own or embelishing an open source example screensaver and include the gpio control you want. http://www.dis.uniroma1.it/~liberato/screensaver/

If not just add the relevant gpio control when your system fires the screen saver and again when it regains control or on any user input

Return to “General discussion”