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.
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