Problem with MMA8452Q Accelorometer

Hi,

I am using the following code to work with MMA8452Q accelorometer breakout(Arduino UNO) . The readings are fluctuating even when the accelerometer is not moving. Can you please verify the code and let me know what's the problem.

Thank you very much

accelorometer_gvalue_wire.ino (5.46 KB)