Picade HAT Volume Control?

Just swapping over to Picade HAT from the non-HAT version and was wondering if someone could tell me how volume up/down now works please?

The GitHub page for the HAT just tells you how to configure volume control, so I was wondering how you now turn volume up/down via software?


Sorry, was thinking out aloud whilst cabling in the new HAT. Now that I have it up and running, I can see that volume level is controlled within Retropie and that this just needs to be set before running games.

if you are swapping the PCB for the HAT version in your Picade I encourage you to wire up the volume buttons to GPIO13 (DOWN) and GPIO 26 (UP) on the right hand side (obviously grounded).

… I’ve just pushed a new feature that should allow you to control the volume via the buttons in-game, similarly to the way your old Picade worked (well, this is software control acting on gpio events, so not quite, but same principle).

to get the latest and greatest, you can just run the setup installer again:

curl https://get.pimoroni.com/picadehat | bash

… or cd ~/Pimoroni/picade/picade-hat/ ; git pull ; setup.sh

Here it it is action:

… obviously you don’t have to use terminals (the header pitch does not match), you could just solder them in place, or wire them in any way you like.

currently I’m using a 5% step up or down, please let me know if you think that the granularity is about right (20 steps from min to max is quite a lot, perhaps too many?)

Excellent! Thank you, I shall definitely give that a go!

I shall need to drill another button hole in the cabinet because the software power on/off is very handy (using my vol up button for now).

Given that this will free up the SPKR connectors, can these be repurposed/assigned to extra keys? Looking at “picade-hat/daemon/usr/bin/picadehatd” the volume buttons seem to be directly coded with no easy way to customise them?

    gpio.setup(VOLUME_DOWN, gpio.IN, pull_up_down=gpio.PUD_UP)
    gpio.setup(VOLUME_UP, gpio.IN, pull_up_down=gpio.PUD_UP)

However, first I need to get the controls working in game - fine within the Retropie menu, but no response at all in SNES or GBA (but that’s for another topic).

P.S. Yeah I would say perhaps 10%. Is there scope for a separate config file where options such as volume % step and button mappings to keyboard could be configured by the user? I see that these can be edited in the above mentioned file but would these would be overwritten in an update?


I’m not sure I follow you… the speaker terminals on the Picade HAT are not inputs, they receive the signals from the on-board amp. You still need to wire a (single) speaker there.

All this does is take the 2 GPIO currently unused (those typically linked to interfaces notwithstanding) and add them to the daemon to watch, and trigger a bash script that issues command to amixer when an event is detected.

ahhh right, yes I see what you mean now. :)

You still need to wire a (single) speaker there.

Do you advise against running both speakers from the speaker terminals on the Picade HAT? I have both cabled into that port…

You are in effect wiring the speakers in parallel I believe, meaning the net impedance is divided by two.

… I don’t know if you can damage the amp but it is meant to drive 4 ohms speakers, so unless yours are 8 ohms (and I’m pretty sure they are not), it’s probably not a good idea.

I’ll probe the engineer to be sure, but for now I recommend you only hook up a single speaker.

The amp chip performance is only defined for speaker impedance of 4 ohms or higher. Thus, if your speakers are our normal 4 ohm Picade speakers, it’s probably not a good idea to wire them in parallel straight to Picade HAT, as that would make the total impedance only 2 ohms. What you could do instead is wire the speakers in series to get a total impedance of 8 ohms, like this:

Thank you for the advice, i’ll rewire them in series.

I am in the process of upgrading my Picade to the new X Hat version and want to wire up the volume buttons to GPIO13 (DOWN) and GPIO 26 (UP). What is the “cleanest” way to do so, given that they are apparently not available on the Hat board? Any suggestion? I’d rather not solder them directly on my Pi… Thanks!

I’d suggest using the BTN7 and BTN8 pins on the Picade X HAT Hack Header. They are GPIO pins BCM 14 and 15. That’s the route of least friction.

Thanks for the recommendation. I wired the buttons to BTN7 and BTN8 pins on the Picade X HAT Hack Header but I have a hard time getting them recognized. After a clean install (installing all Picade support files from “https://get.pimoroni.com/picadehat” and configuring the basic buttons), I modified the “picadehat-custom” files to associate the buttons to volume controls (I have in the file “VOLUME_CONTROL = True”, “VOLUME_DOWN = 15”, “VOLUME_UP = 14”) and installed it ("./configload picadehat-custom" followed by reboot). Yet buttons don’t appear to be working. Did I miss something? How can I check if the driver receives data from the buttons? Thanks!

Looking at this again, it looks like the legacy Python driver and the current one can’t coexist peacefully alongside each other, so that probably explains why it isn’t working. I’ll speak to @gadgetoid about a way to add support back in for using these as volume control buttons,

Hi, so the official word is that, if we use the latest driver (from https://github.com/pimoroni/picade-hat), i.e., not the legacy one, there is no support for volume up/down? Just checking before removing the buttons for good. Thanks.

Hey everyone. I’ve been putting together a custom arcade build, using the PicadeX… has anyone ever figured out how to get external volume control with the BTN7 and 8 spots on the board? Thanks

One way could be to configure buttons 7 and 8 to produce key presses, then configure the triggerhappy daemon to respond to those key presses to adjust the volume.