2017/12/11 2017-12-11 本文已影响0人 汝黎明 from pyb import Pin,Timer;即可产生PWM信号,tim=Timer(2, freq=1000),设置频率,ch.pulse_width_percent(50),设置占空比。