Skip to main content
Visitor II
March 13, 2025
Question

How to write library for LSM6DSOWTR

  • March 13, 2025
  • 2 replies
  • 767 views

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.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    March 13, 2025

    Hi @Shubham08 ,

     

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

    Thanks!

    Shubham08Author
    Visitor II
    March 13, 2025

    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