Jiri As I understand - with Capelet I can use all P8+P9 pins. No analog input/output, right?
With the capelet (which is an expansion on top of the Bela cape) all the pins listed here are still in use. You can still access all the digital I/O and also a number of hardware PWM channels. You can either use the hardware PWM pins on the BeagleBone or perhaps do "soft" PWM by toggling one of the Bela digital pins. In Pd, soft PWM is done, e.g.:
[out 11 ~( << initialize Pd's digital 11 as an output at audio rate
[phasor~ 1000] << carrier frequency
[+~ 0.25] << sets the pulse width: -0.5 is 0%, 0 is 50%, 0.5 is 100%
[dac~ 11] << this is the digital output initialized above. It is thresholded at 0.5.
The advantage of the above solution is that it can be done from Pd (or Supercollider) without need for custom externals/ugens. However, the bit frequency is fixed at 44.1kHz, so the resolution is limited.
If you want to use the hardware PWM pins, then you get much higher bit clocks and resolution, but controlling it requires either writing a custom uGen (for Supercollider) or writing some C++ code in a custom
render.cpp file for PureData, see e.g.: here. An example use of the hardware PWM is shown in the documentation of this example .