2013-08-28 10:57 AM
Hi
Can any one tell me how to get the acceleration value ? I want to calculate the distance by using it. Thanks. #stm32f4-discovery #clive12013-08-28 11:19 AM
Have you worked the following example?
\STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\MEMS\main.c2013-08-28 11:34 AM
Yeah , but in this example only light toggled with respect to direction of acceleration. I want the value of acceleration in x,y and z-axis so that i could calculate the distance from it.
2013-08-28 11:36 AM
Actually i am making a device like odometer. So my need is to get the distance when the stm32f4 is move.
Thanks.2013-08-28 01:10 PM
Ok, but this is your project, you'll need to modify this other one that demonstrates talking to the accelerometer
LIS302DL_Read(Buffer, LIS302DL_OUT_X_ADDR, 6);
XOffset = Buffer[0];
YOffset = Buffer[2];
ZOffset = Buffer[4];
You might need to read the
http://www.eng.auburn.edu/~nelson/courses/elec5260_6260/LIS302DL%20MEMS%20Accelerometer.pdf
for the part to configure it the way you want.2013-08-29 01:30 AM
Ok thanks but i am totally novice to stm and i am confused about some things and these are :
what is going to be stored in buffer[1] , buffer[3] , and buffer[5] ? what values are actually being read in Xoffset , Yoffset , Zoffset ?