openmv控制MG995舵机时用的官方库函数,但是舵机不转
-
使用官方库调用servo_control舵机控制,电池用的是官方的锂离子电池3.7V-1000MAH,但是舵机不动
import pyb import time s1 = pyb.Servo(1) # create a servo object on position P7 s2 = pyb.Servo(2) # create a servo object on position P8 while(True): for i in range(1000): s1.pulse_width(1000 + i) s2.pulse_width(1999 - i) time.sleep(10) for i in range(1000): s1.pulse_width(1999 - i) s2.pulse_width(1000 + i) time.sleep(10)
-