-
Notifications
You must be signed in to change notification settings - Fork 30
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
Comments
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. |
calling |
did anyone solve this? I can't turn the display off. EDIT: my bad, I had not passed the right value |
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. |
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#16The text was updated successfully, but these errors were encountered: