- This topic has 1 reply, 2 voices, and was last updated 9 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › i2c mesh network / know thy neighbour
Dear all,
I am new to this forum and have a question that has been bothering me for a while.
My approach might be wrong and your advise would be much appreciated.
I am trying to build a network of components with unique IDs where I can address on component and request its neighbouring component IDs. The network should work in a 'plug and play' manner.
I have been exploring the idea of using I2C as they are simple components that can have a unique identifier and a value that can be read or written. On connecting a component – is it possible to pass this component's ID or values to its neighbouring I2C?
Basic example:
I2C/A (id: A, value: 0)
I2C/B (id: B, value: 0)
I2C is connected to an arduino
I2C/A is connected to I2C/B
I2C/A transfers its ID to I2C/B resulting in I2C/B (id: B, value: A)
I2C/B’s value is read via arduino as A.
Hi Howard,
Actually i2c is a master/slave protocol.
Master This is the device that generates clock, starts communication, sends I2C commands and stops communication
Slave This is the device that listens to the bus and is addressed by the master
Multi-master I2C can have more than one master and each can send commands
Arbitration A process to determine which of the masters on the bus can use it when more masters need to use the bus
You can set the address of slave by the master so your approach is correct but the explanation and the implementation steps are slightly different.