2017-05-07 10:43 AM
this is the
LIS3DSH
accelerometer on stm32f4discovery board0.12 mg/digit sensitivity it has how to calculate exact output with respect to unit of g
is there any tutorial or documentation that explain stuff.
##lis3dsh #mems #accelerometerSolved! Go to Solution.
2017-05-07 11:03 AM
It's just basic maths, you take the 16-bit signed integer, cast it into something like a float or double, and scale it.
ie float x = (float)OUT_X * 0.12e-3; // x is now a value in units G
The OUT_X holds a value +32767 to -32768, or +/-3.93G, ie think 32768.0 * 0.12e-3
2017-05-07 11:03 AM
It's just basic maths, you take the 16-bit signed integer, cast it into something like a float or double, and scale it.
ie float x = (float)OUT_X * 0.12e-3; // x is now a value in units G
The OUT_X holds a value +32767 to -32768, or +/-3.93G, ie think 32768.0 * 0.12e-3
2017-05-07 01:20 PM
thank you