ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had the same info and errors showing up and like in the comments suggested, the solution was to add a delay(). In my case using delay(3) of 3 ms solved the issue.

Note also that the delay() won't block any interrupts (e.g using attachInterrupts) which is described in the notes of the arduino docs:

Certain things do go on while the delay() function is controlling the Atmega chip, however, because the delay function does not disable interrupts. Serial communication that appears at the RX pin is recorded, PWM (analogWrite) values and pin states are maintained, and interrupts will work as they should.