Skip to main content
Visitor II
February 22, 2022
Question

asm330lhh. XYZ values do not correspond to the actual location

  • February 22, 2022
  • 1 reply
  • 818 views

Hi,

I using test library from ST:

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/asm330lhh_STdC/examples/asm330lhh_read_data_pollng.c

My code is based to this code.

and I can`t fugure out why Y is too small (and not shows negative values) and Z is always 0

I placed it in all projections, according to the picture:

a) Acceleration [mg]:-32.82 3.84 0.00
b) Acceleration [mg]:-997.47 15.49 0.00
c) Acceleration [mg]:1004.24 15.37 0.00
d) Acceleration [mg]:24.34 11.59 0.00 
e) Acceleration [mg]:17.08 0.06 0.00
f) Acceleration [mg]:9.64 0.00 0.00
 

    This topic has been closed for replies.

    1 reply

    ST Employee
    March 3, 2022

    Hi @Akellaerepelkin​ ,

    I'm not sure you are reading the Y and Z axis well as the X axis... Are you using the I2C or SPI interface? And are you configure a single or a multiple reading pattern? In this second case, I would suggest you to check the correct pattern, from datasheet p.25 and 27.

    By the way, can you correctly read all the other registers?

    -Eleon