Go Down

Topic: Multiple Master-Slave using I2C (Read 78 times) previous topic - next topic

ElieNas

Hello, I am trying to set up an I2C connection between multiple Arduino Uno (4 maybe 5 if needed).
So what I intend to do is have the following circuit:

I might add an extra arduino in the middle which controls the other four.
my problem is that I am new to all this and I can't seem to wrap my head around how to know which arduino I'm communicating with, (I know the wire.begin(address) function initializes the connection to my slave arduino) but how do i know the address for all other arduinos I am only able to find simple 1 to 1 models and the more complicated stuff seems to be very abstract to me.

realmeteo

#1
Feb 13, 2018, 02:52 pm Last Edit: Feb 13, 2018, 02:57 pm by realmeteo
I think that https://realterm.sourceforge.io/ is a good tool to help you in all I2C diagnostic test.

PLEASE SEE :
I2C & SPI & 1-Wire Bus
I2C, SPI, 1-Wire and other Serial buses can be read using the I2CChip  products "I2C2PC" and the "BL233B" IC. Realterm cannot read I2C without these external devices. It cannot use printer ports, the PC's SMBUS interface etc.
"Follia รจ fare sempre la stessa cosa aspettandosi risultati diversi." Albert Einstein. (Se hai gradito il mio aiuto, grazie per un punto Karma).

lonox

To work with a standard i2c single master setup the master should know the addresses of all devices.

The master is the only device which is able to send messages and request data.

I would after some tests not recommend to use a multi master setup. (multi master is when each device could decide itself when to send data)


ElieNas

To work with a standard i2c single master setup the master should know the addresses of all devices.

The master is the only device which is able to send messages and request data.

I would after some tests not recommend to use a multi master setup. (multi master is when each device could decide itself when to send data)


I am trying to create an automated traffic light intersection that reads heat signals from vehicles.
So I was guessing having one Master controlling the slave on each lane would solve it.

what other options do i have?

Go Up