Open Gadgetoid opened 3 years ago
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 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
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.
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: https://github.com/pimoroni/grow-python/issues/15
Add an
atexit
handler to catch library shutdown and clear/turn off the display, for: https://github.com/pimoroni/grow-python/issues/16