SparkFun_ADXL345_Arduino_Library
SparkFun_ADXL345_Arduino_Library copied to clipboard
g calculation correct for 2g range but wrong for other ranges
The floating point gains built into the library are handy, but are correct only for the 2g range; you'll get erroneous results when using the .get_Gxyz() function and a range other than 2. A solution in .get_Gxyz() would be to multiply each result by (range/2), e.g. 8 for the 16g range.
Want to set up a pull request @mgrusin ?
You mean if I find a bug I have to fix it!? This changes everything.
Coming right up.