multiple i2c buses, nano

Hello, I am fairly new to using redboards. I have a redboard Artemis Nano. the site says there are 4 i2c buses on the board (including the QUIC connector). I was wondering if anyone knows of a guide, example, video, tutorial etc… on how to use more than one i2c bus? It seems obvious, but I have not found too much help.

BTW, the reason is I have two sensors with the same i2c address, so to use them both I would like to use the QUIC connector and a second i2c bus.

THANKS!

Declare a new wire port using the IOM instance that you want like this:

TwoWire myWire(N);

Choose N depending on which pins you want to use (there are 3 options that aren’t on the qwiic connector) for example pins 9 and 10 on the Nano are connected to IOM# N=4

https://cdn.sparkfun.com/assets/5/5/1/6 … s-Nano.pdf

Then you use “myWire” just like you would the normal “Wire”

As of the latest 2.2.1 core (today 4/20/22) this takes two arguments, which are the SDA and SCL pins (not a single device number). Compiling and running the code causes a hard fault. The other method that I used in the past on a Redboard Thing was to reference an external pre-defined Wire1() object as my second i2c device. The result of that technique on Nano is also a hard fault.