Serial Communication halt

Is the 'higher' level function that uses setTimeout. setTimeout(20) looks ok for a delay(100) between sending the csv data.

You could use my SerialComs class. This tutorial Arduino to Arduino via Serial has a CSV example. SerialCom synchroizes the send/receives so that there is no Rx buffer overflows even with long delays on either side.

I suggest you remove the motor stuff to start with and just get the coms running and then add the motor back in as a separate 'task'
See Multi-tasking in Arduino which has a complete stepper example
driven by Serial input and a sensor.
multitaskingDiagramSmall

1 Like

And here is a multitasking example with servos.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.