def laser_move_by_degress(rotation, pitch):
global servo_rotation,servo_pitch,servo_rotation_limit,servo_pitch_limit
if servo_rotation_limit[0] < rotation < servo_rotation_limit[1]:
servo.degree(servo_rotation,rotation)
if servo_pitch_limit[0] < pitch < servo_pitch_limit[1]:
servo.degree(servo_pitch,pitch)
V
vamb 发布的帖子
-
为什么会显示servo未定义