Skip to main content
Visitor II
December 23, 2016
Question

Trouble with LSM6DS3's accelerometer Z & Y axis outputs in SPI mode

  • December 23, 2016
  • 1 reply
  • 990 views
Posted on December 23, 2016 at 07:27

Hi, 

I am new to LSM6DS3 inertial module, I am trying to use it with my arduino mega 2560, in SPI mode ,but in trouble with  Z & Y axis output of the accelero meter. X axis output respond well.

Already tried to read the output raw registers with and without reading the STATUS Register, but the result remains same.  I bought the breakout board from Sparkfun and made necessary changes for using this in SPI mode. Attaching my arduino code with this post.

    This topic has been closed for replies.

    1 reply

    ST Employee
    December 23, 2016
    Posted on December 23, 2016 at 14:33

    Which values did you get from Y and Z axis?

    I would suggest to set BDU bit in CTRL3_C to 1, to have aligned high and low part of data registers.

    I see you are reading the X value twice. Is it intentional?

    Visitor II
    December 23, 2016
    Posted on December 23, 2016 at 15:43

    Changed the value in CTRL3_C to 0x41  , attaching the images of output values of x,y,z of accelero  , all axis are tested with +1g, x gives perfect output, z and y gives some valid output when i give some knock on the table where sensor board is placed.0690X00000605xHQAQ.png0690X00000605xMQAQ.png0690X00000605poQAA.png