Thanks @PJ_Glasso,
here is my platformio.ini below. Note that I’m using I2C for other peripherals (EEPROM for instance) but IMU.begin() returns 0 even if it’s initialized before them.
I’ve read somewhere that IMU uses an internal I2C bus different from the one that is exposed on the Xiao to avoid conflicts, but I couldn’t find where this is set.
Note that I’m using the adafruit fork (which I believe uses this variant.cpp).
[env]
monitor_speed = 115200
upload_speed = 115200
build_flags =
-Wno-psabi
-std=c++1z
-std=gnu++1z
-O2
framework = arduino
lib_deps =
adafruit/Adafruit MCP23017 Arduino [email protected]
robtillaart/[email protected]
arduino-libraries/Arduino_LSM6DS3@^1.0.3
[env:xiao]
platform = https://github.com/maxgerhardt/platform-nordicnrf52
board = xiaoblesense_adafruit