Need tutorials for pirate audio pHAT's

hi, i recently got a pirate audio speaker pHAT and it sound really good but the interface is terrible.

i would like to add a simple interface to the screen so i can control the player similar to how an old mp3 player would display, so i can navigate through my spotify library and saved mp3’s and play them.

i might add a clock/calendar too, as that would be handy.

i also want to make system information and system admin screen, so i can manage the installed linux system without needing to ssh from another device.

whats needed is some tutorials that:-
1). explain how to set background images (not colour changing rainbows) either in plain generated colour or from image files.
2). explain how to write text/numbers on the screen.
3). explain setting up buttons and the options for the buttons, also how to use 2 buttons at same time eg… press B + Y to go to next screen.
4). explain how to setup changing from one screen to next with button press.

also which program do i need to add too? is it for mopidy or mopidy-PiDi-plugin?

should i make them as installable addons? and how do i package them into installable addons.

i hope somebody can help with all this



im definetly going to buy more of these pirate audio speaker pHAT’s to experiment with and im going to buy some of the other versions in the same range to experiment with too.

also how do i set it to change button configuration when page changes to load that pages button defination?

That display is the 1.3" IPS color LCD (240x240px) (ST7789 driver)
Which is this display
1.3" SPI Colour Square LCD (240x240) Breakout – Pimoroni
Anything written for the 1.5 version will run on the 1.3 and vice versa. Those examples should work with no editing.
The code for the enviro and enviro+ will show you how to display text and numbers and icons etc. You will just have to use the width height for the ST7789, and the ST7789 library. Any code trying to call up sensor data will fail, but it will show you how to put text etc on the screen.
Same deal for the automation hat examples. They just have to be edited for the bigger screen.

RPI.GPIO can be used for the buttons, use the BCM numbers.


import os
import time, datetime

import RPi.GPIO as GPIO

GPIO.setup(16, GPIO.IN, pull_up_down = GPIO.PUD_UP) # X Button

def Shutdown(channel):  
    os.system("sudo shutdown now -P")

GPIO.add_event_detect(16, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)

cool thanks dude.

i also have a mocute bluetooth mini-control (it has a thumb-stick and 4 buttons) and was wondering how to connect it to mopidy?
i have it already connected to my pi zero w and set to be remembered and auto-pair.



I have never setup or used mopidy, can’t help you there unfortunately.

I have an original Pirate Radio based on the pHat Beat. I don’t play MP3’s etc, I just stream music from the internet.