jeroendoggen / Arduino-MMA7361-library

Arduino library for the MMA7361 3-axis MEMS accelerometer
16 stars 24 forks source link

Calibrate function: static error #3

Open jeroendoggen opened 9 years ago

jeroendoggen commented 9 years ago

From jeroendoggen on August 19, 2012 13:27:39

Clean up code with #defines where needed:

int AcceleroMMA7361::getXRaw() { return analogRead(_xPin)+_offSets[0]+2; <- Why add 2?? }

Test if this is true: The +2 was added to compensate for a static error in the sensor we used while developing this code. If I remember correctly, we took 10000+ samples, where the expected value of the reading would be zero. The (more or less Gaussian) curve of all the samples, was not centered around zero but around -2... --> solution: add a static correction.

Original issue: http://code.google.com/p/mma7361-library/issues/detail?id=3