Communication I2C

Hi guys

I am in the middle of a research project in which I need to make the connection of two arduinos nanos to a mega that would be the master in which each of the two nano will carry a sensor and I need the mega arduino to be in charge of receiving the information and to do its processing, the only thing that I require is to send this information, I do not need to drive any actuator.

I have been analyzing several communication protocols but I still cannot decide which one is the most suitable for this task since I am quite new in this issue of microcontrollers and I would like you to help me with the advice on how to program the slaves to be You are sending information to the teacher and what would be the most successful communication protocol and its respective connection

Tell us about the type (s) of sensors you are going to connect with NANOs. The available communications protocols that are supported by Arduinos are:

1. UART Port driven serial data communication

2. SPI Port driven serial data communication

3. I2C Bus driven serial data communication

Here is an example of a typical connection between two Arduinos.
multicomA.png

multicomA.png

How far apart are the sensors and the master. Some systems are only suitable for short ranges.

How much and how complex is the data is being exchanged. Will the data need cutting into packets and CRC checking.

How electrically noisy is the environment. An place where you have close proximity to radio transmitters, motors, transformers etc with long cable runs are better suited to differential standards like CAN, RS485, RS422 with shielded cabling.

I think the diagram is not quite correct.
Master MOSI should connect to Slave MISO.
Master MISO should connect to Slave MOSI.

Similar to having Master Tx go to Slave Rx, and
Master Rx coming from Slave Tx.

CrossRoads:
I think the diagram is not quite correct.
Master MOSI should connect to Slave MISO.
Master MISO should connect to Slave MOSI.

Similar to having Master Tx go to Slave Rx, and
Master Rx coming from Slave Tx.

This is the official connection between SPI-Master and SPI-Slave with which the connection of Post#1 agrees. SPI is a circulating buffer system; whereas, a UART is not. Does Master-Slave concept exist for UART Communication?
spiATmega328Py.png

spiATmega328Py.png