This is very repeatable. Also then can not upload a new sketch to the board.
Observation: Will happen even if using a different sketch like wire scanner but you can open and close the ser mon a few more times before it occurs.
==============================================================
BNO055 on a Uno R4 Minima Board
Same Library - same sketch
Not seeing the same issue with Serial output nor upload issues.
Could try the @KurtE UARTS code fix but that has not been accepted for incorporation.
UPDATE: Tried this with a MPU-9250 and same things happens but recovery with cycling of power seems to work better to recover seeing the data. Also, note same thing happens with trying upload another sketch after closing the serial monitor but also found keeping the serial monitor open helps to avoid the issue with com not found.
Now checked the BNO055 (adafruit lib) and BNO080 (sparkfun lib) on Wire and Wire2 on the wifi board. Both work but still exhibit the issue with serial data.
Note: Can not check wire1 - connector broke - have new board on order before anyone asks if I checked Wire1.
Would be good to get confirmation
But that trick with leaving the serial monitor while uploading a new sketch seems to be working more than not.
@ptillisch - would this be better suited as a github issue or as a forum issue
Trying to debug this a bit more looks like the sketch is still running but after it loosed connection to the serial monitor after you open and close it.
I modified the BNO080 test sketch using Wire so that the LED will blink while the loop is running to see if the board hangs or its a serial issue.
#include <Wire.h>
#include "SparkFun_BNO080_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_BNO080
BNO080 myIMU;
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("BNO080 Read Example");
pinMode(LED_BUILTIN, OUTPUT);
Wire.begin();
myIMU.begin();
Wire.setClock(400000); //Increase I2C data rate to 400kHz
myIMU.softReset();
delay(250);
myIMU.enableRotationVector(50); //Send data update every 50ms
Serial.println(F("Rotation vector enabled"));
Serial.println(F("Output in form roll, pitch, yaw"));
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
//Look for reports from the IMU
if (myIMU.dataAvailable() == true)
{
float roll = (myIMU.getRoll()) * 180.0 / PI; // Convert roll to degrees
float pitch = (myIMU.getPitch()) * 180.0 / PI; // Convert pitch to degrees
float yaw = (myIMU.getYaw()) * 180.0 / PI; // Convert yaw / heading to degrees
Serial.print(roll, 1);
Serial.print(F(","));
Serial.print(pitch, 1);
Serial.print(F(","));
Serial.print(yaw, 1);
Serial.println();
}
digitalWrite(LED_BUILTIN, LOW);
}
Now when I close and reopen the serial monitor which continues to show no data is printed I can see that the sketch is still running but not is going to the serial monitor.
And if I try to upload a sketch I get the dreaded error message:
No device found on COM7
Failed uploading: uploading error: exit status 1
until I can re-establish the serial connection I can not upload. Once I get the data streaming again in the IDE I can upload with no issue. Board still shows as a com port throughout this whole process.
@ptillisch - wonder if this is an indicator of why issues on uploading.