pimoroni / st7789-python

Python library to control an ST7789 240x240 1.3" TFT LCD display.
MIT License
193 stars 51 forks source link

DAC audio being lost when using the screen #9

Open duracell80 opened 3 years ago

duracell80 commented 3 years ago

On the pirate audio board, is there anything in the LCD driver here that could be causing the audio to cut out from the DAC when using the screen?

An initial thought I had was the backlight pins, a conflict there or something similar?

duracell80 commented 3 years ago

In image.py in examples the backlight pin is set to 19 possibly causing the sound to drop. Should this be 13?

mo6 commented 3 years ago

I experience this issue also. Sounds works fine, but when after using the image.py script the sounds stops working.

mo6 commented 3 years ago

Commenting the backlight config seems to fix this, though.

mo6 commented 3 years ago

Like this:


disp = ST7789.ST7789(
    port=0,
    cs=ST7789.BG_SPI_CS_FRONT,  # BG_SPI_CS_BACK or BG_SPI_CS_FRONT
    dc=9,
#    backlight=19,               # 18 for back BG slot, 19 for front BG slot.
    spi_speed_hz=80 * 1000 * 1000,
    offset_left=40 if display_type == "round" else 0
)
laust0rm commented 3 years ago

I used this library, but 1. the display is only showing white, probably because I used a 480x320 screen and the resolution is wrong, so not actually a big deal, 2. it doesn't turn off. is there a function of the display object that resets it? also, i haven't connected the reset pin, however I don't know if that has something to do with this problem.

laust0rm commented 3 years ago

Okay, I'm a little dumb and after 10 minutes of digging into the init() of the lib I found out that not only can you specify the reset pin, you can also set the resolution, so sorry I was posting before thinkig. :/

josephernest commented 2 years ago

Worked for me with backlight=13.