Pinout pisound header as the button

Hi,
Is it possible to use pinout pisound header https://blokas.io/pisound/docs/Specs/#pinout-of-pisound-header as The Button?

Yes, you should be able to assign another GPIO number for pisound-btn, see: Using button without pisound

See this script: https://github.com/BlokasLabs/pisound/blob/master/scripts/common/start_puredata.sh#L50

The magic trick is the large chunk of code between ( and ) & is executed in parallel, and it first sleeps for a few seconds, before performing the aconnect calls.

So it kind of schedules the aconnect calls to happen a few seconds later, and it continues to launch Pure Data. The ‘&’ symbol is the one that makes it run in parallel (background)

@Giedrius So Basically does it work like this?
Are these the right steps?

  1. connect pin 21 to a momentary switch pin
  2. the other pin of the momentary switch to ground
  3. on terminal: ExecStart=/usr/bin/pisound-btn --gpio 21
  4. the pin 21 will take over the all functions of The Button?
  5. to adjust the functions of pin 21, go to patchbox > button > assign

GPIO21 on Raspbery Pi is the I2S_DOUT pin, used for audio. You should pick one GPIO pin from the Pisound header of unused pins: https://blokas.io/pisound/docs/Specs/#pinout-of-pisound-header

Also, the pisound-btn assumes that the pin’s pull up resistor is configured properly already (the Pisound’s button itself is preconfigured using the device tree overlay built into the I2C EEPROM chip on Pisound), you’ll have to configure the pin you use manually: https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md, so add a line like this to the /boot/config.txt, change accordingly to your chosen pin:

gpio=27=pu # Enable pull up resistor

@Giedrius ah … so e.g. take BCM 27

  1. connect pin 27 to a momentary switch pin
  2. the other pin of the momentary switch to ground
  3. /boot/config.txt add this line > gpio=27=pu
  4. on terminal: ExecStart=/usr/bin/pisound-btn --gpio 27
  5. the pin 27 will take over the all functions of The Button?
  6. to adjust the functions of pin 27, go to patchbox > button > assign

ExecStart line has to be edited in the pisound-btn’s service file, see my reply here where I explain the steps: Using button without pisound

I wrote this or do you mean to do this?
sudo systemctl status pisound-btn
and add this line
ExecStart=/usr/bin/pisound-btn --gpio 27