logo

单独舵机测试代码可以控制舵机运动, 而加入其它语句就不行了

2019-04-06 13:48
R
yq5u
import sensor, image, time
import pyb
import car
from pyb import Pin, Timer,Servo
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(10)
sensor.set_auto_whitebal(False)
clock = time.clock()
green_threshold   = (85, 42, 15, 58, 68, 31)
size_threshold = 2000
K=460
i=0

s3 = Servo(3) # P9

s3.angle(45)
time.sleep(1000)
s3.angle(-45)
time.sleep(1000)
2019-04-08 09:34
I
网红小智智 星瞳科技

舵机不能和小车一起用。引脚冲突。