COM Port disappears after uploading the Code

Hi Guys,
I'm working on a project using the Arduino Nano BLE 33. After I upload the code the arduino disappears from the Device Manager and i can't acces the Serial Port. The code worked before but after i came back from another project with the BLE its not working anymore. When I delete the IMU part in the loop the problem is gone.

Thanks for ur help!

#include <Arduino_LSM9DS1.h>
#include <Arduino.h>
float x, y, z, omega, beta, gama, mx, my, mz;

void setup()
{
Serial.begin(9600);
}

void loop()
{

if (IMU.accelerationAvailable())
{
IMU.readAcceleration(x, y, z);
}
if (IMU.gyroscopeAvailable())
{
IMU.readGyroscope(omega, beta, gama);
}

Serial.print("x:  ");
Serial.print(x);
Serial.print("  y:  ");
Serial.print(y);
Serial.print("  z:  ");
Serial.print(z);

Serial.print("  omega:  ");
Serial.print(omega);
Serial.print("  beta:  ");
Serial.print(beta);
Serial.print("  gama:  ");
Serial.print(gama);
Serial.println();

}

Please post ALL your code in [code tags]
Currently, we can’t see where you instantiate IMU.

Take a look at https://maker.pro/arduino/tutorial/how-to-use-the-arduino-nano-33-bles-built-in-imu

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.