finished math and upload commands for accelerometer cal