Hello,
I'm working on a project that uses Multi-Master I2C communication between ten (10) Arduino Megas and could use some advice. This is going to sound like I'm asking you to debug my code, but this is more just giving you a good idea of the general scope of my project and some concerns I have with it.
One device is used as user input that sends four (4) bytes of information upon button press to six (6) of the other Megas for controlling the position of multiple motors (6 per arduino, totaling 36 motors in this system). Those (6) motor controllers then send position data to the three (3) remaining controllers for monitoring.
Overall, a lot of bytes of information are being sent. Ultimately, the user input arduino is sending 4 bytes of information upon a button press, and the others are sending 36*5 bytes of information continuously, not including the timing bytes for clock.
I have a rough test set up for operation with the user input controller, a single controller for motor operation, and a single monitoring controller. It currently works, but occasionally, upon user input, the motor controller stops functioning. I believe it is due to the receiveEvent interrupting the transmission to the monitoring controller. It seems to fail to receive the incoming data as well as restarting the communication with the monitors.
Is there a way or method to ensure that the processes don't get interrupted? Maybe a way to ensure that the user input doesn't attempt to send until the line is clear? Is this a timing problem? Is I2C communication not fast enough to handle the scope of my project?
Any thoughts, comments, or criticisms?
Thank you ahead of time.