cancel
Showing results for 
Search instead for 
Did you mean: 

How to write library for LSM6DSOWTR

Shubham08
Associate II

I am trying to interface LSM6DSOWTR with stm32 using I2c interface. This is the schematic i have made for this module

Shubham08_0-1741853131591.png

 

While connecting SD0/SA0 is connected to GND, I have tried to run the I2C scanner and found that it its address is 0x6A but in the main code i am unable to get the accelerometer and gyroscope value from its address.

In the attachment, i have  attached main.c, and the library created for it.

2 REPLIES 2
Federica Bossi
ST Employee

Hi @Shubham08 ,

 

Can you try to implement our official PID examples and let me know if you solve the issue?

Thanks!

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Shubham08
Associate II

I  got the libraries and function but how to use the function in main.c as in the main.c i am reading the address of device but unable to read accelerometer and gyroscope value and i have read the function but confused of calling and using the function in main.c

Can you provide me some sample code for main.c