logo

为什么下面的程序运行后舵机不动?

2021-08-11 21:28
W
wami
# Servo Control Example
#
# This example shows how to use your OpenMV Cam to control servos.
 
import time
from pyb import Servo
 
s1 = Servo(1) # P7


while(True):
    for i in range(-90,90):
        s1.angle(i)
        
        time.sleep(10)
    for i in range(90,-90):
        s1.angle(i)

        time.sleep(10)
2021-08-12 16:47
I
网红小智智 星瞳科技

time.sleep(10),延时了10秒。