add DisplayOff script, which turns off backlight and then stops the display driver - running Soundslab will start it back up.
This commit is contained in:
parent
c225dbd50b
commit
c9cc8cfd89
16
DisplayOff.py
Executable file
16
DisplayOff.py
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
from ST7789 import ST7789
|
||||||
|
|
||||||
|
SPI_SPEED_MHZ = 80
|
||||||
|
|
||||||
|
st7789 = ST7789(
|
||||||
|
rotation=90, # Needed to display the right way up on Pirate Audio
|
||||||
|
port=0, # SPI port
|
||||||
|
cs=1, # SPI port Chip-select channel
|
||||||
|
dc=9, # BCM pin used for data/command
|
||||||
|
backlight=13,
|
||||||
|
spi_speed_hz=SPI_SPEED_MHZ * 1000 * 1000
|
||||||
|
)
|
||||||
|
|
||||||
|
st7789.set_backlight(0)
|
||||||
|
st7789.command(0x28) # DISPOFF
|
Loading…
Reference in New Issue
Block a user