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

Display Off + Clear At Exit #17

Open
Gadgetoid opened this issue Aug 27, 2021 · 4 comments
Open

Display Off + Clear At Exit #17

Gadgetoid opened this issue Aug 27, 2021 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Gadgetoid
Copy link
Member

Add display off (or sleep) functionality (actually send the display off command) and corresponding display on functionality for: pimoroni/grow-python#15

Add an atexit handler to catch library shutdown and clear/turn off the display, for: pimoroni/grow-python#16

@Gadgetoid Gadgetoid added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 27, 2021
@KuriGohan-Kamehameha
Copy link

also having this issue, the display blanks but the backlight remains on. pretty useless as a power-saving tool. The backlight is connected to GPIO 12, pin 32. I don't know much Python but I'm assuming that wiringpi is the ideal tool for the job.

@tomjn
Copy link

tomjn commented Jul 19, 2023

calling set_backlight does not appear to have an effect on the backlight, passing 0 yields no change. Directly sending GPIO.LOW to the backlight pin also had no effect

@ziofil
Copy link

ziofil commented Aug 2, 2024

did anyone solve this? I can't turn the display off.

EDIT: my bad, I had not passed the right value backlight='12' in the init. Now it works.

@benwebbbenwebb
Copy link

I was just playing around with the Pimoroni Enviro+ and was wondering the same about how to get the screen to turn off when the script was interrupted by CONTROL + C, the following seems to work for me...

# Exit cleanly
    except KeyboardInterrupt:
        # blank screen (but backlight still stay on)
        st7735.display_off()
        # turn off backlight
        st7735.set_backlight(False)
        sys.exit(0)

Note: I was using the looping "combined.py" example script (that in theory could run forever), which is why I was calling it in the KeyboardInterrupt, but I'm sure the same could be run at the end of other scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants