Forum Archive

Accelerometer error dependant on phone position?

nope

I was just playing around with the ipod touch 5 accelerometer using pythonista's motion module. I wrote this little script to see how much the error was:
http://pastebin.com/fr7tuuKJ
Apparently the error is highly dependent on the position the phone is in (which side it's resting on). Can anybody else confirm this? That said, can omz comment on the frequency of the updates possible?

JadedTuna

I've tried this script on iPad 3 and I am always getting [0., 0., 0.]...

[deleted]

@nope I think you need to use start_updates first...

"All the get... functions require that you call start_updates() first, otherwise, no meaningful data will be returned."

ccc

You should add motion.start_updates() to the script to see values.

nope

Ah, sorry about that, I just started it when python started and didn't add it into each individual script because it stayed started. But that aside, after you add the motion.start_updates() can you guys see any pos dependent error?

[deleted]

@nope How to distinguish between error and true results? Btw don't know if this is any help... http://developer.apple.com/videos/wwdc/2012/?id=524