New
#1211
having a issue installing this,Pirate Audio: Speaker for Raspberry Pi – Pimoroni ,I'm missing something ,,get the buttons to work but not playing mp3's ..
having a issue installing this,Pirate Audio: Speaker for Raspberry Pi – Pimoroni ,I'm missing something ,,get the buttons to work but not playing mp3's ..
i had only run command to check temp, I got it playing my mp3,read a bit and it said maybe disable audio ,in config file ,that made it work for when i click on a mp3 file , will tinker some more later with using Mopidy maybe
edit, install fanshim and the speaker stopped working ..LOL
Last edited by caperjack; 31 Jul 2020 at 16:36.
Terminal means command line. It's where you run the commands to install the software or edit config files.
As you found out, to get the DAC working you need to edit the config.txt file and add
dtoverlay=hifiberry-dac
gpio=25=op,dh
dtparam=audio=off
And more of the same to get the display working. Make sure SPI is enabled for the display.
GitHub - pimoroni/st7789-python: Python library to control an ST7789 240x240 1.3" TFT LCD display.
This is what I did to get my breakout garden version of that display working
1.3 color tft LCD on btreakout garden pHat, SPI i2c - Support - Pimoroni Buccaneers
The buttons go something like this in python. This is the code I used for my Unicorn Hat Mini. You'd have to change the Dim, Bright etc for other functions.
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(5, GPIO.IN, pull_up_down = GPIO.PUD_UP) # A
GPIO.setup(6, GPIO.IN, pull_up_down = GPIO.PUD_UP) # B
GPIO.setup(16, GPIO.IN, pull_up_down = GPIO.PUD_UP) # X
GPIO.setup(20, GPIO.IN, pull_up_down = GPIO.PUD_UP) # Y
GPIO.add_event_detect(5, GPIO.FALLING, callback = Dim, bouncetime = 2000)
GPIO.add_event_detect(6, GPIO.FALLING, callback = Bright, bouncetime = 2000)
GPIO.add_event_detect(16, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)
GPIO.add_event_detect(20, GPIO.FALLING, callback = color, bouncetime = 2000)
thanks for the info ,but my brain ain't got nuttin but fog in it now, was never that good ,but now even worse....wanna buy a pirate audio ,lol
edit ,,think i'll have a big pi add on's sale , one of these day , and just keep a few simple things to tinker with ,in all honestly I am having an issue with my memory and confusion ,its driving Darlene crazy , i have to check the days off on the calendar,and check my Cell to see what day it is ,,,
Last edited by caperjack; 31 Jul 2020 at 18:03.
I'll trade you a Unicorn Hat Mini with diffuser for it. Setup for that isn't too bad and I have some cool code done up for it. And all the buttons figured out python wise. It's 17x7 RGB with 4 buttons like the Pirate Audio has.
The deal with the Pirate Audio is, the DAC, and LCD screen, and Buttons, are each setup separately. The DAC is actually pretty easy to get working and make the default audio, as long as you don't make a typo or something it will just work after editing the config.txt. The screen takes a bit of work, and still won't display anything without being told what to display. Depending on what you want shown on it, that can be a bit of work. The Buttons are pretty easy python wise to make use of, depending on what you want them to do. On the Unicorn Hat Mini mine do brightness up down and shutdown. On the Pirate Audio using them for play pause etc might not be too bad depending on the Pimoroni airplay etc software install. I don't know, I don't have a Pirate Audio. I'm still using my old pHat Beat Setup for my tunes.
If the Pimorni software for the Pirate Audio gets you your song and track info etc, and sets up the buttons, it shouldn't be too bad. You'll just have to do the basic stuff first, setup the DAC and run the installer for the screen. Then install the "Pimoroni" version airplay or whatever software to get full functionality.
This is the screen used on the Pirate Audio board.
1.3" SPI Colour LCD (240x240) Breakout – Pimoroni
Those install instructions will work for it.
The following "should" make the scrolling-text.py example file work on it. If it doesn't let me know and I'll see if I goofed up. I think its just the backlight pin thats moved compared to the breakout garden wiring. It's SPI0 and CE0 as near as I can tell.
Code:disp = ST7789.ST7789( port=0, cs=0, dc=9, backlight=13, spi_speed_hz=80 * 1000 * 1000 )