cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up LSM303AGR for accelerometer measurements?

MTole
Associate II

The register CTRL_REG1_A is set with 0x57 and CTRL_REG4_A with 0x80.

All output Accelerometer registers give the same value 0xC0.

What is missing for correct accelerometer measurements?

1 REPLY 1
Miroslav BATEK
ST Employee

You can use the platform independent drivers available in GitHub:

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lsm303agr_STdC

There is also example for basic sensor setup and data reading.

For more details please read application note AN4825:

https://www.st.com/content/ccc/resource/technical/document/application_note/group0/6d/cd/b8/e0/44/98/4e/81/DM00265383/files/DM00265383.pdf/jcr:content/translations/en.DM00265383.pdf