Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
openMV云台搭载到无人机上,云台一直旋转搜寻目标,当搜寻到目标时,我想让云台返回当前的旋转度数,以便调整无人机的飞行姿态。我用s1 = pyb.Servo(1) angle=s1.angle() 来返回当前舵机旋转度数,但为什么返回的总是0,是不是函数用错了?应该用哪个函数返回当前的舵机旋转度数
如果涉及代码,需要全部代码文本
@kidswong999
角度=0 while True: 色块们=find_blobs() if not 色块们: 角度=角度+1 舵机转(角度)
就比如你给的这一个,当舵机检测到色块时,如何返回此时的旋转度数
print(s1.angle())