Hi, I have an issue with both of my Nano RP2040 boards. They stop working after calling the IMU.accelerationAvailable function. After calling that function the board freezes and it gets very hard to connect to it and the Arduino editor prints errors like "Serial port busy" etc. Seemingly randomly I can connect to it and upload a sketch without the call to IMU.accelerationAvailable to unfreeze the board.
Is this a known issue with any possible workarounds?
#include <Arduino_LSM6DSOX.h>
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.print("Accelerometer sample rate = ");
Serial.print(IMU.accelerationSampleRate());
Serial.println(" Hz");
Serial.println();
Serial.println("Acceleration in g's");
Serial.println("X\tY\tZ");
}
void loop() {
float x, y, z;
Serial.println("Hangs just before calling IMU.accelerationAvailable()!");
if (IMU.accelerationAvailable()) {
Serial.println("It never reaches this line!");
IMU.readAcceleration(x, y, z);
Serial.print(x);
Serial.print('\t');
Serial.print(y);
Serial.print('\t');
Serial.println(z);
}
}