2013-04-26 09:25 AM
HI,
I want to know how to convert the values ​​that provides MEMS accelerometer on g because I need to set the threshold for single /double click detect.For example in the program MEMS in STM32F4-Discovery_FW_V1.1.0 firmware how to change buffer[4]'s value en g ???thanks in advance.2013-04-26 10:05 AM
for more explanation, for example, a value higher than 70 along the axis Z causes an interrupt so how to set the threshold for single / double click to generate this interrupt?
2013-04-27 12:05 PM
See paragraph 7.21 in the LIS302DL data sheet.
Cheers, Hal2013-04-28 04:06 AM
my problem is how to convert data that i got from accelerometer on g ?
while searching i found out that i have to multiply values on the buffer wich contains MEMS's mesures by the sensibility (18 mg/digit) because the bit FS is set to 0 is that correct?2013-04-29 11:26 AM
You have the right idea, but the answer is a bit more complicated than that.
The accelerometer provides 8 bits (0 to 255) to represent full scale from maximum negative to maximum positive acceleration. The accelerometer data should be converted to a signed number, then subtract 128 before multiplying by the sensitivity. That will give an answer from -2304 to 2286 mg. Cheers, Hal