Also, I've been wondering how I could calibrate the accelerometer because people hold their devices in varying ways. My AccelerationYwithG doesn't need to be calibrated, but my XwithG does.
I've tried storing a global variable called AccelXCali set to XwithG at start, then adjusting my comparisons according to that value, but I get weird values for AccelXCali. Sometimes it's 0.9..., others it's 0, and once it was like 300k. Obviously not much of a calibration. Am I checking the accelerometer too early?
Thanks!