Hello @jimbo_s
you'll need to have two I2C instances, Wire1
for internal stuff (AXP, Touch, RTC, etc.) on pins GPIO21 and GPIO22 and Wire
for your sensor on pins GPIO32, GPIO33.
The M5Core2 library already set Wire1
up for the internal stuff:
Wire1.begin(21, 22);
so your sensor should use Wire
. You can enable that on the correct pins by calling:
M5.begin(true, true, true, true);
the last true
sets Wire
up:
Wire.begin(32, 33);
You probably need to change the library for the sensor to use Wire
instead of Wire1
. How that is done depends on the library. Some allow to pass in the I2C instance to be used and some need to have every instance of Wire1
replaced manually to Wire
.
The key here is to not mess with Wire1
else you loose all I2C communication within M5Core2.
Cheers
Felix