The XIAO and the XIAO BLE Sense module use different CPUs and are quite different in operation. Both are supported in the Arduino IDE, but you gotta select the right one. No manual modification of the Arduino library folder (or anything else) if you follow the instructions on the XIAO BLE Sense Wiki that I pointed you to in my previous post. Use Arduino’s Boards Manager and Libraries Manager.
I didn’t make this stuff up. Just went along with the program. See Footnote.
Anyhow, the Wiki shows screen shots, so I won’t bother to attach my own, but here’s the drill:
-
Add the link to the seeeduino boards .json file in the File-Preferences window. If you already have other stuff in the “Additional boards Manager URLs:” entry, put in a comma and the new link.
-
You may (or, maybe, not) have to leave Arduino and come back in to see the effect. Then in the Tools->Board->Board Manager… window, search for “seeed nrf52” and click on “Install”
-
You may (or, maybe, not) have to leave Arduino and come back to see the effect. Then under Tools->Board->Arduino Mbed OS Boards select Seeed XIAO nRF52840 Sense
Conclusion (so far): I found that the information XIAO BLE Sense Wiki page to be completely adequate.
Then, on the XIAO Expansion board Wiki, the example did not work as posted. Changing the object to use Hardware I2c instead of Software I2C brought expected results.
It crossed my mind that, since the Expansion board Wiki was written for the XIAO, not the XIAO BLE, maybe that was the problem. In fact, as I discovered, it the wiki code compiled without errors for the XIAO, but didn’t work. Changing to Hardware I2C worked for both boards.
Bottom line: Does it work for you after changing the board selection and changing the single line of code that I showed in the sketch? How about my test code that I attached to the previous post?
Regards,
Dave
Footnote:
No one was born knowing this stuff, you know.