在/boot/config.txt 末尾加如下内容:
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=2
在dotnet中 对应channel 0 和 1
using PwmChannel pwm0 = PwmChannel.Create(chip: 0, channel: 0, frequency: 4, dutyCyclePercentage: 0.5);
using PwmChannel pwm1 = PwmChannel.Create(chip: 0, channel: 1, frequency: 4, dutyCyclePercentage: 0.5);
之前用18 19 , 频率不能改变,不知道为什么