diff --git a/DM/DM_Motor_controller.py b/DM/DM_Motor_controller.py index 8662570..0d86109 100644 --- a/DM/DM_Motor_controller.py +++ b/DM/DM_Motor_controller.py @@ -254,3 +254,6 @@ if __name__ == '__main__': move_to_ori_position() time.sleep(5) # 电机运动需要的时间 + while(True): + time.sleep(1) + diff --git a/RK1106/stepper_motor.py b/RK1106/stepper_motor.py index 6c040f8..cfc1025 100644 --- a/RK1106/stepper_motor.py +++ b/RK1106/stepper_motor.py @@ -213,4 +213,13 @@ def cleanup(): if __name__ == '__main__': align_wire(speed=2500, cycle=10.0) time.sleep(10) # 电机运动需要的时间 + + # 测试是否电机能停止 + motor_start(speed=2500, cycle=5.0, direction=0) + time.sleep(1) # 电机运动需要的时间 + motor_stop() + time.sleep(0.2) + + while(True): # 防止程序退出 + time.sleep(1) diff --git a/conveyor_controller/conveyor_motor.py b/conveyor_controller/conveyor_motor.py index 9e522bb..b0517c5 100644 --- a/conveyor_controller/conveyor_motor.py +++ b/conveyor_controller/conveyor_motor.py @@ -390,3 +390,7 @@ if __name__ == '__main__': time.sleep(1) sync_motor_move(False) + time.sleep(0.5) + + while(True): + time.sleep(1) diff --git a/servo/servo_control.py b/servo/servo_control.py index 356a2c3..42e114c 100644 --- a/servo/servo_control.py +++ b/servo/servo_control.py @@ -145,3 +145,7 @@ if __name__ == '__main__': time.sleep(1) move_to_ori_position() # 旋转0度 time.sleep(1) + + while(True): + time.sleep(1) +