-
I have already installed libmraa.
-
I have already settup /boot/hw_intfc.conf
intfc:pwm0=on
intfc:pwm1=on -
reboot ROCK pi 4 SE several times.
-
Testing pwm.c in /usr/local/share/mraa/examples/pwm.c and compile it with:
sudo gcc -o pwm pwm.c -lmraa
sudo ./pwm
Failed to initialize PWM -
Trying to using python to test.
import mraa
import time
x = mraa.Pwm(11)
x.period_us(700)
x.enable(True)
value = 0.0
while True:
x.write(value)
time.sleep(0.05)
value += 0.01
if value >= 1:
value = 0.0
but no luck …
Is there something wrong with the low level library?