Hi,
I’m programming using PlatformIO, for which there is unfortunately currently no official support (for reference this PR has been open for 2 years now…)
I checked that I’m testing on a Xiao Sense and not Xiao BLE classic.
From what I’ve gathered this could be due to the IMU reading from the wrong I2C bus but I’m not sure. If that’s the case the issue is probably more on the PlatformIO configuration side, but I figured I’d ask here if anyone has had this issue ?
Hi there,
It works fine… I use it.
What does you platform INI look like?
Be sure to check the box for use Arduino Libraries in the project open dialog.
Compiles, and works, allows Debugging as well.
HTH
GL PJ
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).
I haven’t looked at how the libraries are different but it goes in the direction of the I2C bus being the wrong one (as in both cases the address is 0x6A).
Thanks anyway !
Hi there,
Nice, As I stated it works properly and so does the Debugging So you are on the right path.
The trick is there are several libs, that work on certain INI environments you 'll find this as you proceed.
GL PJ