NanoPi 2 PWM Example

Damir
Hello!
Import python matrix library
import os
import time
from ctypes import *
lib = cdll.LoadLibrary('/root/matrix-master/lib/libfahw.so')
funcpwm0=lib.boardInit()
os.system("modprobe matrix_pwm")

i = 1
while i < 1000:
    print(i)
    i = i + 1
    time.sleep(0.025)
    funcpwm=lib.PWMPlay(0, 1000, i)

funcpwm_stop=lib.PWMStop(0)