舵机控制识别,求助求助求助求助
-
为什么舵机控制没有反应? !
-
from pyb import Servo import time s1 = Servo(1) # servo on position 1 (P7) s2 = Servo(2) while(1): s1.angle(90) # move to 90 degrees s2.angle(90) # move to 90 degrees time.sleep(1) s1.angle(45) # move to 45 degrees s2.angle(45) # move to 45 degrees time.sleep(1) s1.angle(0) # move to 0 degrees s2.angle(0) # move to 0 degrees time.sleep(1) s1.angle(-60) # move to -60 degrees s2.angle(-60) # move to -60 degrees time.sleep(1) s1.angle(-90) # move to -90 degrees s2.angle(-90) # move to -90 degrees time.sleep(1) print(1111)
重写了代码,舵机运动很随意,时好时坏的,一会转了,一会又不转了
-
我测试了一下,很正常。