An Arduino code for detect and explain movements with vectors.
This code detects movements with vectors for 3-dimensional space, you can change the dimension by erasing Y and Z vector codes.
Disclaimer: MPU6050 can measure temperature but this code not for that.