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.
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
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.