Fabiux
Posts: 31
Joined: Wed Mar 27, 2013 5:49 am

Adafruit PiTFT: turn off display when unused

Wed Feb 19, 2014 4:27 pm

Hi,
I have a python script. This script draw 2 buttons on display, when a button is pressed the script send some data on a socket.

There is a way to turn off the backlight after some second of inactivity and then turn it on when someone touch the screen?

Thanks

Fabio

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Adafruit PiTFT: turn off display when unused

Wed Feb 19, 2014 4:58 pm

It's certainly possible to turn off the backlight with a python script (I'll post a link to my code later today).

You'll just need to add some code to check for inactivity e.g. compare time now with time of last button press.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Adafruit PiTFT: turn off display when unused

Wed Feb 19, 2014 6:24 pm

RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

Return to “Python”