I am trying to use the PWM pins from python using the Adafruit-BBIO.PWM library. I have already got the GPIO pins to work using the same method but doing so with the PWM pins gives me the error “RuntimeError: Unknown error”
Some websites suggest that Adafruit-BBIO no longer works, but if it does not then it seems there is no alternative to using the PWM pins in python.
I am using the latest image (BeagleBoard.org Debian Bullseye IoT Image 2023-09-02). I am confused that there is little to no explicit documentation on how to use the board’s basic functions.
Thank you for your help! The python code example made things extremely clear.
I was able to get an output that I could measure with my multimeter. However, the output works if and only if the period is set to 1 second. The example you showed indicates that smaller periods should be allowed, but I get an error:
OSError: [Errno 22] Invalid Argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/debian/pwm.py”, line 26 in
f.close()
OSError: [Errno 22] Invalid argument