I’m trying to read the onboard LSM6DS3TR-C IMU on a Seeed Studio XIAO nRF52840 Sense board using a small Arduino C test program. The setup is:
Board: Seeed Studio XIAO nRF52840 Sense
Core: Seeed nRF52 Boards, 1.1.13
Arduino IDE 1.8.19
Platform: macOS Sequoia
The program compiles and uploads successfully, but produces no output in Serial Monitor. It seems to be hanging when executing Wire1.endTransmission().
Test program:
#include <Wire.h>
void setup() {
Serial.begin(9600);
int powerpin = 15; // Enable the IMU power rail
pinMode(powerpin, OUTPUT);
digitalWrite(powerpin, HIGH);
delay(10);
}
void loop() {
Wire1.begin();
Serial.println("Wire1 started");
Wire1.beginTransmission(0x6A);
Wire1.write(0x0F);
Wire1.endTransmission(false);
Wire1.requestFrom(0x6A, 1);
Serial.print("WHO_AM_I = 0x");
Serial.println(Wire1.read(), HEX);
delay(1000);
}
I’ve tested the same program on a XIAO MG24, with the Silicon Labs core, with powerpin changed to 19, and this prints the expected values:
Wire1 started
WHO_AM_I = 0x6A
Any suggestions for further tests would be appreciated.