在/boot/config.txt 末尾加如下内容:
dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,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);