Skip to main content

Control PI Touch Screen with GPIO

Project description

PiTouchScreen

Programmatically control the Raspberry Pi Touch Display

Features

GPIO Control

With a button connected to pin 17:

  • Cycle brightness between 50, 100, 150
  • Long-press button for 1 second to turn off the screen
pi-touch-screen pi-touch-screen --channel 17 -bl 50 -bl 100 -bl 150 --power-sec 1 
Thread-safe - `BacklightManager` provides thread-safe attribute access and thread-safe sysfs read/writes - Reading or setting values requires owning a lock - Prevents race conditions from threaded callbacks
Install as Service
  • Save pi_touch_screen_service.service to $HOME/.config/systemd/user/pi_touch_screen_service.service
  • Run systemctl --user edit pi_touch_screen_service and modify ExecStart to use your desired parameters
  • Run systemctl --user enable pi_touch_screen_service to run the service at startup

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pi-touch-0.1.0.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

pi_touch-0.1.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page