# Picade X Hat: additional buttons

**URL:** <https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683>\
**Category:** Picade\
**Created:** [April 27, 2020, 9:02pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683 "2020-04-27T21:02:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forums.pimoroni.com/u/pascal)\
**Post date:** [April 27, 2020, 9:02pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/1 "2020-04-27T21:02:14Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [April 27, 2020, 9:53pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/2 "2020-04-27T21:53:58Z")

</div>

Button 7 and 8 on Hack Header maybe?

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forums.pimoroni.com/u/pascal)\
**Post date:** [April 28, 2020, 6:46am UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/3 "2020-04-28T06:46:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [April 28, 2020, 10:14am UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/4 "2020-04-28T10:14:02Z")

</div>

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](https://learn.pimoroni.com/?term=picade)

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forums.pimoroni.com/u/pascal)\
**Post date:** [April 29, 2020, 7:36pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/5 "2020-04-29T19:36:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [April 29, 2020, 8:04pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/6 "2020-04-29T20:04:34Z")

</div>

That I don’t know. I don’t game on my Pi and have never used RetroPie etc.

---

<div class="post-metadata">

**Author:** ![spfunnell](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@spfunnell](https://forums.pimoroni.com/u/spfunnell)\
**Post date:** [May 26, 2020, 12:18pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/7 "2020-05-26T12:18:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forums.pimoroni.com/u/pascal)\
**Post date:** [May 26, 2020, 12:40pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/8 "2020-05-26T12:40:10Z")

</div>

Yes I got both buttons to work on a RPi4. Let me know if you need help.

---

<div class="post-metadata">

**Author:** ![spfunnell](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@spfunnell](https://forums.pimoroni.com/u/spfunnell)\
**Post date:** [May 26, 2020, 12:47pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/9 "2020-05-26T12:47:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![spfunnell](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@spfunnell](https://forums.pimoroni.com/u/spfunnell)\
**Post date:** [May 26, 2020, 2:51pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/10 "2020-05-26T14:51:09Z")

</div>

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\>;

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forums.pimoroni.com/u/pascal)\
**Post date:** [May 26, 2020, 2:52pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/11 "2020-05-26T14:52:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forums.pimoroni.com/u/pascal)\
**Post date:** [May 26, 2020, 2:54pm UTC](https://forums.pimoroni.com/t/picade-x-hat-additional-buttons/13683/12 "2020-05-26T14:54:19Z")

</div>

Yes there are also the pins there, good that you made it work.
