Take note: Be conscious that interrupts have to be used judiciously as they're able to disrupt the serial communication in between your microcontroller and ROS. Constantly make certain that your ISRs are as small and successful as is possible to avoid timing challenges. The Arduino IDE delivers almost limitless opportunities https://simonbiova.blogars.com/26132352/an-unbiased-view-of-ros-compatible-robot