logo

为什么不能控制舵机转到180°

2021-03-13 14:31
7
vwpf

import time

from pyb import Servo

s1 = Servo(1) # P7

s2 = Servo(2) # P8

while(True):

s2.angle(-90)

time.sleep(2)

print(1)

s2.angle(0)

time.sleep(2)

print(2)

s2.angle(90)

time.sleep(2)

print(3)

2021-03-15 13:51
I
网红小智智 星瞳科技

查一下舵机的参数,https://singtown.com/product/536/st90s/

s1 =Servo(1)
s1.calibration(500,2500,500)
s1.angle(-90)