使用一下代码后,不同次启动发现甚至转动的舵机都不同,使用的是官方舵机。
tim = pyb.Timer(4, freq=50)
ch1 = tim.channel(2, Timer.PWM, pin=Pin("P7"),pulse_width = 500 )import time
from pyb import Servo
s1=Servo(1)
s2=Servo(2)
s1.calibration(500,2500,500)
s2.calibration(500,2500,500)
while True:
s1.angle(0)
s2.angle(0)
time.sleep(1)
s1.angle(90)
s2.angle(90)
time.sleep(1)