MPU-6050 Z-axis

Thanks for your response. I'm sorry to hear you are also having the same problem. Did you try Krodal's code that I mentioned too? How modified is your code? When I run the sketch the time interval is approximately 1ms between readings (at the default sampling rate).

Your modification to the sampling rate appears to be correct from what I can tell, however I had not ventured that far yet. The time interval between your readings indicates a 50 Hz sampling rate though, am I right?

50 Hz = 1second / ~20 milliseconds (0.02 seconds)

So either your extra code is running too slowly and the buffer overflows before it is read again, causing the FIFO overflow, or you had the sampling rate set to something else when you recorded that output.

Does the sampling time make sense if you use setRate(99) (do you get 100 ms between samples)? The datasheet says that 4 Hz is the minimum.

I'm by no means a coding wiz but if you were unable to read the buffer in a timely manner you could check the size of the buffer and if it exceeded 1024. If so, reset it (using 'mpu.resetFIFO()') then return to the beginning of the loop without analyzing anything to read the next sample. Highly inefficient but it's an idea.