Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backlite through GPIO #357

Open
AstroxV opened this issue Jan 21, 2023 · 1 comment
Open

Backlite through GPIO #357

AstroxV opened this issue Jan 21, 2023 · 1 comment

Comments

@AstroxV
Copy link

AstroxV commented Jan 21, 2023

I have this display: https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(C)

I have OctoScreen running but when the screen goes into sleep mode (i adjusted disableblankscreen.sh), the backlite remains on since it's not working with the dpms functions.
Now in the documentation of the display it says you should use GPIO to control the backlite.

Is there somehow I can make OctoScreen make a command run when the screensaver kicks in?
I can make a script running to check if the display is on or not and make it run the GPIO status, but thats a dirty sollution, haveing the script loop every second or so to check the status of the display and adjust the GPIO.

Hope someone can help me with this. I looked through the source code but haven't found anything yet I can adjust to make this work.

@ArcAIN6
Copy link

ArcAIN6 commented May 5, 2024

Because the disablescreenblank.sh is just a shell script, you should be able execute a python script from within it.

Easiest way i can see, is to create two python scripts using gpiozero library, one for on, one for off.. then use an if/else in the shell script to run either one depending on if the screen is supposed to be off / on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants