Hi,
I have the first version of the Picade cabinet that came with the old Picade HAT but I upgraded it to a recent Pi 4 and the new Picade X Hat. The old cabinet had 2 additional buttons (for volume) that are not in the more recent, smaller version (i.e., 12 buttons instead of 10). Can I somehow wire them all to the Picade X Hat and use the additional two? If so, how? Thanks!
Button 7 and 8 on Hack Header maybe?
Interesting suggestions! Does anyone have experience with connecting and configuring these buttons? It seems we need to disable the UART to re-assign them as GPIO… I’ll check the code of the driver but if someone has already done it, that would be helpful.
I think those are the pins that can also be used for Plasma.
I don’t own a Picade, just so you know. ;)
There is some Picade stuff in the learn section.
https://learn.pimoroni.com/?term=picade
I managed to make it work with some editing of the picade.dts overlay, the buttons are mapped to keys. The only question I have left is if it is easily possible to map these keys to volume up/down (as in the original picade)? Any idea? Thanks.
That I don’t know. I don’t game on my Pi and have never used RetroPie etc.
Hi,
Did you do this with an RPi4? I managed to get Button 7 to map and work OK using this method, but button 8 doesn’t seem to work properly.
Cheers
Simon
Yes I got both buttons to work on a RPi4. Let me know if you need help.
Thanks, interesting. These are the steps I took so far.
I modified the picade.dts file to include
button7: button7 {
label = "Button 7";
linux,code = <78>;
gpios = <&gpio 15 1>;
};
button8: button8 {
label = "Button 8";
linux,code = <74>;
gpios = <&gpio 14 1>;
};
and also
button7 = <&button7>,"linux,code:0";
button8 = <&button8>,"linux,code:0";
The did sudo ./install.sh
Rebooted, then Button 7 works, but Button 8 does nothing and then after a while, puts out some characters without the button being pressed (’-’ character in this case).
I tried disabling Serial as suggested by alphanumeric in a different thread, but that didn’t make a difference. Also tried a vanilla install of Raspian which did the same.
Did I miss anything?
Fixed it. The missing part of the puzzle was specifying the pins in the dts file.
brcm,pins = <5 6 8 9 10 11 12 14 15 16 20 22 23 24 25 27>;
I have added similar code to picade.dts:
button7: button7 {
label = "Button 7";
linux,code = <114>;
gpios = <&gpio 14 1>;
};
button8: button8 {
label = "Button 8";
linux,code = <115>;
gpios = <&gpio 15 1>;
};
and
button7 = <&button7>,"linux,code:0";
button8 = <&button8>,"linux,code:0";
then
cd Pimoroni/picade/picade-hat/
sudo make all install
then rebooted and it works. I use triggerhappy
to control the volume.
Yes there are also the pins there, good that you made it work.