Skip to content

Python 3 scripts to turn an official Raspberry Pi touchscreen off and on

License

Notifications You must be signed in to change notification settings

giddyhup/touch-toggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Touch Screen Toggle

Python 3 scripts to turn an official Raspberry Pi touchscreen off and on. An one for Waveshare's 7 inch HDMI (+ USB) touch screen.

The scripts are extensively documented and, alternatively, work with the official Raspberry Pi touch screen. The Python module evdev must be installed (globally or specifically for root). To change the screen's state sudo/root rights are required.

simpletouch.py can be used to toggle the screen off and on by touch. There is no specific region where the screen must be touched. All events are passed on to whatever is displayed on the screen.

simpletouch_waveshare.py can be used to toggle a waveshare touch screen off and on. There is no specific region where the screen must be touched. All events are passed on to whatever is displayed on the screen.

specialtouch.py can be used to toggle the screen off by touching it in a specified rectangle (the source code needs to be edited). While the screen is off touch events in any area turn it back on. Since the user may not know what's on the screen while it is off all touch events are grabbed/discarded.

About

Python 3 scripts to turn an official Raspberry Pi touchscreen off and on

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages