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:
Sundog Jones 2020-07-21 18:49:51 -07:00
父節點 c225dbd50b
當前提交 c9cc8cfd89
共有 1 個文件被更改,包括 16 次插入0 次删除

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