Been programing long time with C# and Java but fairly new to Arduino.
I have an Arduino Nano that monitors 7 ultrasonic sensors. When a sensor sense a certain distance I send an communication to a Arduino Mega connected via I2C. This works fine, but if the Mega is "busy" running other code it is not going to process the data from the Nano in a timely manner.
Is there a way to make the I2C communication an Interrupt on the Mega so that when an data is sent it immediately performs some code in a method.
Hope this makes sense.