Hi team,
I have some problems using the libmraa library for pwm(I want to control my led), when a run my script it says that the pwm is not initialized correctly.
As I was searching for a solution, I learned that only the Pin 28 MPP4 in the LS header is capable of producing the PWM output.
This is the code I used:
import mraa
import time
initialise PWM
x = mraa.Pwm(28)
set PWM period
x.period_us(700)
enable PWM
x.enable(True)
value= 0.0
while True:
# write PWM value
x.write(value)
time.sleep(0.05)
value = value + 0.01
if value >= 1:
value = 0.0
I am using the latest version of debian, retrieved from Debian Downloads for dragonboard-410c - 96Boards
I am looking forward for a response.
Thanks.