Code for MMA7660. But its resolution is so low that the accelerometer will not be useful here. I'll try to find the
MPU-6050 I have.