MPU6050 calibration sketch is continuously calculating

For a self balancing robot project, I want to make MPU6050 sensor come into horizontal position everytime it loses its balance.
Therefore, I placed the sensor horizontally and uploaded the code in this
link. The code keeps continuously calculating these six values.

buff_ax= 24212 buff_ay= -5720 buff_az= 770924
abs(mean_ax) = 484 ay=114 az= 15900

Like this

Have you encountered the same? I would appreciate if you help. Thank you

For informed help, please read and follow the directions in the "How to use this forum" post.