Analog signals can vary anywhere between 0 and 1, whereas digital signals on the Bela have only two states (0, 1). In my project I am using two different types of analog sensors, which are an accelerometer and two potentiometers. I will explain them in more detail afterwards. With these analog inputs you can have a variable control over some parameters and tune them exactly like you want them to be. (Bela, 2021)
To read from the analog inputs in Pure Data an adc~ object is needed. The incoming signals are sampled at audio sampling rate, so that you can handle them in the same way as audio signals.
As mentioned above, the digital inputs have only two states and are perfect suitable for push buttons. The digital port has to be configured as an input or output. To use a push button it has to be an input of course. If the button is pressed, the input receives the incoming 3.3 volts, and 0 V when its off. In the following example in Pure Data, digital pin 18 is set as an input and pin 17 as an output. (Bela, 2021)