Have I missed something. My Thing ('compass.ino' example) stops when I try to access the BMM150 library (BMM at I2C address 0x13) in Arduino Cloud. All works as expected outside the cloud. Yes, I have implemented the recommended sketch structure for I2C devices in Setup. This simple test causes the Thing to stop running. So too does any attempt to access the BMM150 within the sketch. If I comment the statement out, the sketch continues.
if(bmm.initialize() == -1) {
Serial.println("Chip ID can not read!");
while(1);
} else {
Serial.println("Initialize done!");
}
I see there is a report of a problem with the way that library does I2C communication:
This could potentially be problematic when used on a board that relies on an on-board I2C device for its Arduino Cloud functionality (as some Arduino boards do).
That has already been fixed in the library, but there wasn't a new release since that time so the version you get from Library Manager still has the bug.
Hi ptillisch. Thank you for your response. I am using a generic ESP32-wroom-32 (dev module) and the "Grove 3 axis compass v2.0 BMM150" libraries. To date, I have been using the board and sketch with Blynk without any issues, but recently modified the sketch to run in Arduino Cloud - to keep all my projects in one environment. BTW, I also have a BME280 on the same I2C bus, which works as expected.
OK, that disproves my hypothesis that the way the library was doing I2C communication with the BM150 was conflicting with another device on the same bus used by the ArduinoIoTCloud library. An ESP32 board does not rely on any such device.