I communicate with GRBL firmware via serial port using Python on my computer. The code is as follows. However, when I receive the "OK" message, the stepper motor is still in motion. I want to close the serial communication only when the stepper motor has completely stopped moving, i.e., when s.close() is executed. How can I achieve this result?
I communicate with GRBL firmware via serial port using Python on my computer. The code is as follows. However, when I receive the "OK" message, the stepper motor is still in motion. I want to close the serial communication only when the stepper motor has completely stopped moving, i.e., when s.close() is executed. How can I achieve this result?