atmega2561 & LIS3LV02DQ(3-axis accelerometer)

Hi everyone,

Currently I have the accelerometer hooked up to the spi pins of my 2561.

I can read the WHO_AM_I reg, I can set up the ctrl regs, I get a nice reading from X,Y,Z.

My problem is understanding how to compute the actual acceleration. What I noticed is when I read the x,y,x regs and I move it from point A to B, and the device is placed in the same position. The reading are basically the same. So how do you actually get acceleration?

I also tried using those crazy registers like

FF_WU_CFG, FF_WU_SRC, FF_WU_ACK, FF_WU_THS_L, FF_WU_THS_H

FF_WU_DURATION.

The first 3, CFG, SRC, ACK are pretty straight forward, CFG sets up everything, SRC, tells you where the interrupt occured, and ack, just clears everything, so ur rdy to get new data. Now the DURATION from my understanding is the length of time it actually waits before capturing data??? to avoid error readings. The last 2 are the threshold values, I understand the change has to pass this threshold inorder to interrupt, but how do u compute the threshold values?

Sorry for the lengthy post, but I truly need help, mainly with understanding, but help no the less.

Thank you

The x, y, and z values are updated real time and if you read them while moving they will show G forces on the three axis. If you have this in a portable configuration get a friend to drive you around in his car and watch the changes. Or you could hold it at arms length and spin around but do that in a locked room if you want to keep your dignity.

I’m having problems reading the right value for the WHO_AM_I register in the LIS302DL accelerometer. Can anyone help me out here? Do I need a delay before initializing the sensor or something? The error I’m getting is that I’m sending a 0x8f for the WHO_AM_I register, to tell the sensor I want to read from that register. But I get back the 0x8f I just sent, I don’t know why.

Can anyone help me?

bootloadernoob,

Are you willing to share your code? I was about to get started using my LIS302DL and would love to get started faster :slight_smile: I didn’t read the description well enough and was expecting analog outputs.

Thanks!