I am currently working on a project involving controlling a submersible (the BlueROV from BlueRobotics, which is no longer supported) using an Arduino Mega. We have managed to control the ROV's thrusters and plan on adding sensors, but since they all use an I2C connection, the Sparkfun_Mega module, which we have been using up until this point, will not be sufficient.
My solution was using the MCU_Communicator module to control both the thrusters and send and receive data from the sensors. However, when I downloaded the example program, I noticed a few issues. The first one was that, once the script had been uploaded to the Arduino, RoboRealm could only connect once. If anything was disconnected/closed, the next time RoboRealm started, it would say it was running at 0.0 FPS and could not send or receive any data to/from the Arduino until the script was uploaded again, or on some occasions, until the computer is restarted. Restarting RoboRealm didn't work, nor did unplugging and replugging the connections.
Another issue was that, after a while of running normally, RoboRealm's FPS counter would increase above 120, at which point nothing in RoboRealm was functional. It didn't fully freeze, as when anything was clicked, it would react graphically, but nothing else happened (for example, clicking the options button would cause the button to appear to depress, but the options window would never open). The only way to exit the program at this point would be to force-close the process in task manager.
The third issue seemed to be related to the baud rate. I noticed that at a baud rate of 115200, the program could continuously receive updates to the value of the first variable, count_plus, but only when logic_send was set to 0. Otherwise, it would remain at the value it had when logic_send was changed. In addition, logic_get was locked at 1, and the string-related variables were never sent back. At a baud rate of 9600, all of the variables are sent back appropriately (with the exception of str_to_get, which seems rather erratic; it had been returning the correct string, "MAKE THIS UPPERCASE," but with 6 random characters appended to the end, and now it is returning "this is a test," which is what hard_code_string should and does have). However, no variables change at this rate; count_plus remains at the first value it received, and changing logic_send still has no effect on the state of logic_get. Again, this is using the example program, running the examples provided in the script; I have made no changes to anything besides the baud rate.
Based on this information, what could the underlying problem be? The problems, while being predictable, do not seem to have any specific cause. I am currently testing by powering the Arduino via USB and sending a signal through a Pololu USB-to-Serial adapter (https://www.pololu.com/product/391), which has worked previously with the Sparkfun_Mega module. The only addition is a chip housing an MPU-6050 gyroscope/accelerometer/compass, but the issues seem independent of whether or not the MPU is attached, as I have tested without it and gotten the same results.