251124
This commit is contained in:
parent
85fa04f936
commit
33647fdfae
|
|
@ -213,7 +213,7 @@ class Servo:
|
|||
self.pwm = PWM(Pin(pin, Pin.OUT))
|
||||
# 设置频率
|
||||
self.pwm.freq(frequency)
|
||||
self.pwm.duty_ns(0) # 关闭输出
|
||||
self.pwm.duty_ns(0) # 关闭PWM信号输出
|
||||
except Exception as exception:
|
||||
raise RuntimeError(f"初始化PWM发生异常,{str(exception)}") from exception
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue