NanoPi 2 GPIO Example Python

Damir
import os
import time
from ctypes import *
lib = cdll.LoadLibrary('/root/matrix-master/lib/libfahw.so')
funcpwm0=lib.boardInit()
os.system("modprobe matrix_gpio_int")
funcpwm=lib.exportGPIOPin(22)
funcpwm=lib.setGPIODirection(22, 2)
funcpwm=lib.setGPIOValue(22, 1)
time.sleep(5)
funcpwm=lib.setGPIOValue(22, 0)
lib.unexportGPIOPin(22)
print 222

Damir
Hello!
Import python matrix library