# Using button without pisound

**URL:** <https://community.blokas.io/t/using-button-without-pisound/1272>\
**Category:** Patchbox OS\
**Created:** [July 18, 2019, 7:58am UTC](https://community.blokas.io/t/using-button-without-pisound/1272 "2019-07-18T07:58:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![reverbrick](https://community.blokas.io/user_avatar/community.blokas.io/reverbrick/32/750_2.png) [@reverbrick](https://community.blokas.io/u/reverbrick)\
**Post date:** [July 18, 2019, 7:58am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/1 "2019-07-18T07:58:26Z")

</div>

Hello, I am using patchbox os which is great. What I am trying to do is to somehow use the button finctionality.  
I found out it is hooked to gpio17 so I did the same with my custom button, but now the thing is pisound-btn seems not starting.  
When run I get: “Reading Pisound serial failed, did the kernel module load successfully?” any ideas?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [July 18, 2019, 9:02pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/2 "2019-07-18T21:02:19Z")

</div>

Hey, we’ll add a `--no-pisound` switch to pisound-btn, so it runs anyway, some time next week. 🙂

You have to hook up the button to GPIO17 and the other end of the button switch to GND.

---

<div class="post-metadata">

**Author:** ![reverbrick](https://community.blokas.io/user_avatar/community.blokas.io/reverbrick/32/750_2.png) [@reverbrick](https://community.blokas.io/u/reverbrick)\
**Post date:** [July 19, 2019, 6:36am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/3 "2019-07-19T06:36:47Z")

</div>

Thanks for your reply. I’ll also try to get to understand how those processes work so I can create my own.  
Currently I run a small python program to handle encoder and matrix keyboard via pigpio. Thanks for your support, what you do is really great and stable environment for experiments. Attached the pic of my Jukiffizer I did so my wife can sing through the vocoder.

 ![66886507_459135151596981_5429983292403220480_n](https://community.blokas.io/uploads/default/original/1X/3440127e9148342f54813383953e3fc146cf888e.jpeg) Regards from sunny Poland.

---

<div class="post-metadata">

**Author:** ![martindunne](https://community.blokas.io/user_avatar/community.blokas.io/martindunne/32/614_2.png) [@martindunne](https://community.blokas.io/u/martindunne)\
**Post date:** [July 22, 2019, 8:54am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/4 "2019-07-22T08:54:25Z")

</div>

is it possible to change the gpio to fit with a button on my tft screen. if so where should i look.

thanks

---

<div class="post-metadata">

**Author:** ![reverbrick](https://community.blokas.io/user_avatar/community.blokas.io/reverbrick/32/750_2.png) [@reverbrick](https://community.blokas.io/u/reverbrick)\
**Post date:** [July 22, 2019, 9:22am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/5 "2019-07-22T09:22:22Z")

</div>

Just in case I found it there:

> <https://github.com/BlokasLabs/pisound/blob/master/pisound-btn/pisound-btn.c>

line 39.

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [July 22, 2019, 3:20pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/6 "2019-07-22T15:20:04Z")

</div>

I have just made `pisound-btn` to run even if Pisound is not detected (no config changes necessary), and added a `--gpio N` command line argument to specify which GPIO pin to use. It will also take care of ‘exporting’ the GPIO pin, if necessary. (Changing BUTTON\_PIN would not have been enough, as Pisound’s kernel driver was taking care of exporting the pin)

This is available since pisound-btn version 1.10, you should be able to get it using:

```auto
sudo apt update
sudo apt install pisound-btn

```

---

<div class="post-metadata">

**Author:** ![reverbrick](https://community.blokas.io/user_avatar/community.blokas.io/reverbrick/32/750_2.png) [@reverbrick](https://community.blokas.io/u/reverbrick)\
**Post date:** [July 22, 2019, 3:37pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/7 "2019-07-22T15:37:43Z")

</div>

Thank you! I’ll test it up and report back.

---

<div class="post-metadata">

**Author:** ![Krzysztof](https://community.blokas.io/letter_avatar_proxy/v4/letter/k/ed655f/32.png) [@Krzysztof](https://community.blokas.io/u/Krzysztof)\
**Post date:** [May 25, 2020, 8:07am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/8 "2020-05-25T08:07:07Z")

</div>

Hi, I’m using Pisound and the button works just as expeced, also when I soldered an “external” button to gpio 17 and gnd.

Anyway, when using Patchbox OS on RPi without Pisound, it doesn’t seem to work. I made all recomended updates, the command “–gpio N” does chande the pin and I get info that it’s listening to a certain gpio, but still it doesn’t react to any button pushes / holds.

---

<div class="post-metadata">

**Author:** ![reverbrick](https://community.blokas.io/user_avatar/community.blokas.io/reverbrick/32/750_2.png) [@reverbrick](https://community.blokas.io/u/reverbrick)\
**Post date:** [May 25, 2020, 8:35am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/9 "2020-05-25T08:35:52Z")

</div>

I gave it up as it also does not work for me. Forgot to report it up.

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [May 25, 2020, 9:15am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/10 "2020-05-25T09:15:11Z")

</div>

The Pisound’s device tree overlay configures the button pin as an input pin with pull up enabled, active low mode. If Pisound is removed, the pin is not properly configured.

There’s multiple ways to get this configuration done, you may write and load your own device tree overlay, use commands like `raspi-gpio`, `gpio`, or `pigs` ([example](https://raspberrypi.stackexchange.com/a/36582))

Also, hooking the other end of the button to +3V3 instead of GND can also work, if the GPIO pin you use is by default pulled to ground.

---

<div class="post-metadata">

**Author:** ![reverbrick](https://community.blokas.io/user_avatar/community.blokas.io/reverbrick/32/750_2.png) [@reverbrick](https://community.blokas.io/u/reverbrick)\
**Post date:** [May 25, 2020, 9:21am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/11 "2020-05-25T09:21:34Z")

</div>

Thanks, I’ll have a look

---

<div class="post-metadata">

**Author:** ![Krzysztof](https://community.blokas.io/letter_avatar_proxy/v4/letter/k/ed655f/32.png) [@Krzysztof](https://community.blokas.io/u/Krzysztof)\
**Post date:** [May 25, 2020, 6:53pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/12 "2020-05-25T18:53:12Z")

</div>

Thx, the trick with hooking the other end of the button to +3V3 doesn’t work with GPIO 17 but it does with GPIO 21. However, I have no frickin’ idea how to permanently change gpio to 21. What I do is typing:

pisound-btn --gpio 21

and it says “Listening to events on GPIO #21” and it is listening, indeed. So how do I now save the gpio choice? Because after shutting down and turning on again, it seems that it forgot the change to GPIO 21 and after typing

pisound-btn

it says “Listening to events on GPIO #17” again.

I know nuthin’ about linux, I just want to have Pd patch running headless and be able to switch the rpi safely. So no idea about linux terminal commands, shortcuts etc.

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [May 25, 2020, 6:56pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/13 "2020-05-25T18:56:48Z")

</div>

The +3V3 trick worked for me on GPIO 17 and RPi4, but anyway, to change the pin and save it between reboots, you have to override the pisound-btn.service file. See [this topic](https://community.blokas.io/t/after-install-modep-how-to-install-nginx/1684/2) where I explain how to do it for `modep-mod-ui.service`, and do the same for `pisound-btn.service`, edit the command line appropriately in your copy of the `pisound-btn.service`.

You can find out the current path of `pisound-btn.service` using this command:

```auto
sudo systemctl status pisound-btn

```

---

<div class="post-metadata">

**Author:** ![Krzysztof](https://community.blokas.io/letter_avatar_proxy/v4/letter/k/ed655f/32.png) [@Krzysztof](https://community.blokas.io/u/Krzysztof)\
**Post date:** [May 25, 2020, 8:41pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/14 "2020-05-25T20:41:50Z")

</div>

Giedrius, thanks for immediate reply!  
Unfortunately, I’m stuck again - after few steps, when I’m already editing the copy of “pisound-btn.service” , there’s no gpio number anywhere in the file, so I guess I need to add some new line - where should it be and what should it look like? (told you - no linux skills here, unfortunately…)

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [May 25, 2020, 8:50pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/15 "2020-05-25T20:50:05Z")

</div>

Edit the ExecStart line as:

```auto
ExecStart=/usr/bin/pisound-btn --gpio 21

```

---

<div class="post-metadata">

**Author:** ![Krzysztof](https://community.blokas.io/letter_avatar_proxy/v4/letter/k/ed655f/32.png) [@Krzysztof](https://community.blokas.io/u/Krzysztof)\
**Post date:** [May 25, 2020, 10:03pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/16 "2020-05-25T22:03:11Z")

</div>

Yup it works finally! Thank you!

---

<div class="post-metadata">

**Author:** ![MrHaste](https://community.blokas.io/user_avatar/community.blokas.io/mrhaste/32/2038_2.png) [@MrHaste](https://community.blokas.io/u/MrHaste)\
**Post date:** [July 24, 2021, 10:50pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/18 "2021-07-24T22:50:58Z")

</div>

Im currently messing about with trying to get patches switching with an ESP8266 connecting to the hotspot. My current plan is to use OSC or MIDI but I was wondering if its possible to hook into ‘The Button’ scripts? eg, another python script to emulate GPIO input? (Is that even possible)

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [July 27, 2021, 12:52pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/19 "2021-07-27T12:52:56Z")

</div>

All of the Pisound’s scripts are simple bash scripts, they’re located in [`/usr/local/pisound/scripts`](https://github.com/BlokasLabs/pisound/tree/master/scripts) - you may just execute them directly. 🙂

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [August 27, 2021, 11:00am UTC](https://community.blokas.io/t/using-button-without-pisound/1272/20 "2021-08-27T11:00:21Z")

</div>

Split this topic on August 27, 2021, 11:00am UTC

A post was split to a new topic: [Switching to next pedalboard does not go through all pedalboards](https://community.blokas.io/t/switching-to-next-pedalboard-does-not-go-through-all-pedalboards/3205)

---

<div class="post-metadata">

**Author:** ![toxonic](https://community.blokas.io/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@toxonic](https://community.blokas.io/u/toxonic)\
**Post date:** [February 8, 2026, 2:12pm UTC](https://community.blokas.io/t/using-button-without-pisound/1272/21 "2026-02-08T14:12:24Z")

</div>

I know, this thread is very old, but I also want to add a button to toggle the hotspot of patchbox os without pisound and it seems, that my GPIO 17 is already configured correctly, so I can connect the other contact of the button to GND, am I right?

```auto
patch@patchbox:~ $ pinctrl get 17
17: ip pu | hi // GPIO17 = input

```

Could you please confirm?  
I’m still new to raspberry pi and linux configuration stuff, so i’d appreciate your help! 🙂

[Next page](https://community.blokas.io/t/using-button-without-pisound/1272.md?page=2)
