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

What is a "big" delay? You should be able to receive a message and execute a simple callback in less than 5 milliseconds, but how big is that?

Suggestions:

  • Remove delay(1)
  • Prefer SPI over I2C as it allows much higher bitrates
  • Use interruptions for your communication; make sure your callback does not exceed the interruption rate! (I don't know how the Arduino ROS library works, it seems to already use interruptions via the Timers)
  • Measure time and analyze what is eating time with Micros()