创建PWM实例:
p = GPIO.PWM(channel, frequency)
启动PWM:
p.start(dc) #dc为占空比
修改频率:
p.ChangeFrequency(freq) # freq单位 Hz
终止PWM:
p.stop()
相关链接:
http://blog.youkuaiyun.com/huayucong/article/details/53729765