X-Hat and BTN7 + BTN8


#1

Hey All,

I’ve built my new Picade unit just a week ago, and I’ve been looking into doing a couple mods to it - namely adding in buttons for volume control. I noticed on the Hack Header, there are two additional button headers (BTN7 and BTN8), so I figured using these would be an easy mod. However, I’ve not been able to get Retropie to recognize any button presses from these headers (yes, I have wired to the Ground terminals as well). I ensured my button worked properly as I plugged it in one of the standard button headers (BTN6) and confirmed the button is good.

Has anyone successfully mapped these button headers to either execute a script or act as a keyboard button?


#2

The pinout is here, https://pinout.xyz/pinout/picade_x_hat#
Looks like they go to BCM 15 and 14, pins 10 and 8 of the GPIO.
Best guess is they aren’t programed in the installer by default. You’ll have to do some extra bits to get them working. Map those GPIO to a button in retropi or something?
I don’t own a Picade and have never used retropi etc. If I’m way off target that why. ;)


#3

Thanks for the response :)

You are right, they weren’t programmed in the installer. So I downloaded the code, modified the dts to include button7 and button8 as BCM 15 and 14 respectively with their appropriate linux keycodes, then built and installed the overlay. However, it doesn’t seem to have made a difference, as the GPIO still reports no activity from these button presses (I test on the unit using gpio readall). I must be missing something small somewhere, but can’t quite put my finger on it.


#4

Looks like you’ll have to ask somebody like Phil @gadgetoid from Pimoroni what else is needed to get them working.


#5

Aha, got it working!

So, even though I had programmed in button7 and button8 in the installer, they still refused to register - so I decided just for fun to modify my config file to configure the overrides on the dtoverlay, since I had set up the overrides in my installer as well. So I set my dtoverlay=picade,button7=78,button8=74 and the buttons were then recognized.

Strange how it wasn’t working properly without the override set, but as long as it works, I’m happy.


#6

Good sleuthing, and good to hear you got them working. It would have taken me a month of Sundays to figure that one out.