This commit is contained in:
liubiren 2025-11-24 18:35:30 +08:00
parent 85fa04f936
commit 33647fdfae
1 changed files with 1 additions and 1 deletions

View File

@ -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