Can you control the screen of the Pirate Small Speaker?

I’d like to use the Pirate small speaker with built in screen to make an alarm clock. Can I control what is shown on the screen? Or does it always show music controls no matter what?

The pinout is here,
Pirate Audio Speaker at Raspberry Pi GPIO Pinout

The display uses SPI and you can use it to display what you want.
1.3" IPS color LCD (240x240px) (ST7789 driver)
pimoroni/st7789-python: Python library to control an ST7789 240x240 1.3" TFT LCD display. (github.com)
Those examples will run on it once you install the driver. You might have to change the chip select, not sure? It uses SPI0 CE1
EDIT: this should work.

disp = ST7789.ST7789(
    port=0,
    cs=1,
    dc=9,
    backlight=13,
    spi_speed_hz=80 * 1000 * 1000,    
)
1 Like

Thanks! I’ll have to buy one first as I wasn’t sure it would be possible. I’ll try it out tomorrow.

You just have to be careful with what Pimoroni installers you run. The DAC will work with a couple of config.txt edit. That will get the sound / speaker working. It’s what I did with mine on my Itty Bitty Beat Box.
sudo nano /boot/config.txt
and add

dtoverlay=hifiberry-dac
gpio=25=op,dh

dtparam=audio=off

And then

sudo apt-get update
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy

and
sudo pip install st7789

The buttons won’t do anything though. If you run the spotify install they I think do volume up down, but also uses the display for info etc.

1 Like