Arduino rosserial - Long action results in: lost sync with device
I would like my Arduino Mega 2560 to subscribe to a topic that outputs coordinates. The Arduino controls a stepper motor, (NEMA17 + A4988) that then moves a platform to that coordinate.
I have noticed that the task of moving the platform takes too long, resulting in the error:
"Lost sync with device, restarting..."
I found that a delay(15000)
is enough to give such an error. Similar questions regarding the error said that the spinOnce()
is not called often enough. Does that mean that no action longer than 15 seconds can be performed by the Arduino?
Is this error ignorable? The connection is re-established after the task is finished.
Should I control the stepper in another way?