I have written a code for getting the IMU data for MPU6050. Code is working fine . but when i upload the code and open the serial monitor readings stop after certain time , either i have to re-compile or press the button on arduino to get the readings again .
Can anyone tell me what am I doing wrong or can suggest any changes in the code ?
I did not see any serious problems in your code that could cause the board to freeze.
Probably, the reasons must be sought in the hardware.
Show your wiring diagram with pin numbers including power.
The data sent to the Serial Monitor has printed "below" the viewing panel. Scroll the Serial Monitor up. I have not found a solution to this, only an work-around. That is to put delay(100) in your code, just after the Serial.print();