树莓派4B开启两个硬件PWM的方法
作者:互联网
在/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);
标签:树莓,Create,PwmChannel,0.5,frequency,dutyCyclePercentage,PWM,4B,channel 来源: https://www.cnblogs.com/BillY9/p/15554892.html