Hello everyone,

I'm having a strange issue – I can't get a button to work with any of the digital pins on my Bela. The eventual goal is to simply play back audio when a switch/button is activated.

To get it out of the way:
1. I updated the Bela firmware to the most recent version.
2. I'm confident that the syntax in Pure Data is correct (image attached).
3. I made sure to use pin 0 (on Bela) and ground to test the button.

The digital in example in the IDE specifies to use a resistor to avoid any button noise. I didn't do this, and simply touched two wires together, one from the digital in pin, and the other from the ground. Nothing happens. I tested out different pins, and still the same result. It worked momentarily for just an instant, but that's it. I'm not sure what I'm doing wrong. I checked the troubleshooting section but couldn't figure it out – any help to point me in the right direction would be tremendously appreciated.

Thank you!

alt text

The digital pins have an internal pull-down resistor, which means that they read 0 when nothing is connected or when they are connected to ground. If you connect them to 3.3V (don't use 5V) then you should get a 1.

    Digital pin 1 is pd 12 . Digital in 0 is Pd 11. If you plug 3.3v straight into the pin you will receive a 1. You can then use a switch between 3.3.V and the digital input.

      giuliomoro Ahhh I see what you mean. Put a switch between the digital in pin and the 3.3v. When the pin registers 3.3v, the internal pull-down resistor automatically registers a 1. Makes sense now – I was confused as to why my setup wasn't working. Thank you @giuliomoro!!