sandeepmistry / arduino-nRF5

Arduino Core for Nordic Semiconductor nRF5 based boards
Other
889 stars 277 forks source link

Two I2C buses #391

Open mpava opened 4 years ago

mpava commented 4 years ago

Hi Sandeep and the team,

I have two I2C slaves with the same address. I am going to explore the use of two I2C buses using the Wire library to avoid the address conflict.

I thought I would ask before I get to debugging, if anyone has done this before. I am going to try to call Wire.setPins before I interact with each of the buses. Somehow intuitively I feel this may not work out of the box.

My plan B is to use I2C address shifter e.g. LTC4316 and put both devices on the same bus, this is a hassle, so I would prefer to get plan A working.

Any thoughts / experiences would be appreciated!

thanks!

Mike

dlabun commented 4 years ago

It's probably not going to work just as you suspected. I believe it's TI that makes I2C addressable switches for this very situation.