Page 1 of 1

Adafruit PiTFT: turn off display when unused

Posted: Wed Feb 19, 2014 4:27 pm
by Fabiux
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

Re: Adafruit PiTFT: turn off display when unused

Posted: Wed Feb 19, 2014 4:58 pm
by elParaguayo
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.

Re: Adafruit PiTFT: turn off display when unused

Posted: Wed Feb 19, 2014 6:24 pm
by elParaguayo