Hello,

I'm new to the world of bela, so excuse the basic nature of this question.

I'm really just looking to generate a bang in pd using a two-pin press button, via the bela. I'm using the IDE.

I followed this, ignoring the led part: https://github.com/BelaPlatform/Bela/wiki/Example-projects-and-tutorials#switching-an-led-on-and-off

Wiring:
1. -ve button pin to ground on the bela
2. +ve button pin to 3.3V on the bela via 1k resistor
3. wire from resistor to P8_07 (Digital In 0)

I was hoping that the digital in will detect a change from 0 to 1, and so generate a bang. No luck so far.

Any thoughts much appreciated.

You need to run a Pd patch which handles the digital I/O. This is explained here and among the examples on the IDE you will some which demonstrate the digital I/O, e.g.: examples/08-PureData/digital.
Note that when using Pd on Bela you need to add 11 to the number of the Bela digital (e.g.: digital 0 (P8_07) is Bela_digitalIn11 in Pd). These values are in parentheses in the interactive pin diagram in the Bela IDE.

If you are having troubles with the wiring of the switch, try connecting P8_07 alternatively to GND and 3.3V, this should definitely toggle the input value.

6 days later

You are almost certainly going to need to implement some debouncing in PD as well to avoid multiple-triggering of your bang.