lsm6dsm tilt detection

Hi

I am using lsm6dsm sensor with nrf5340, could you please provide me an example code for that for tilt detection functionality

Thanks
Sumant

  • I can't speak for the LSM6DSM but most of the STM IMU drivers I've seen on Zephyr don't have direct support for the "extra" functionality (MLC, pedometer, built-in activity detection, sensor fusion, FIFO, etc.) aside from sensor hub. You would probably need to add that support in manually, or use a generic I2C/SPI interface for a custom driver. ST provides a platform-agnostic C driver repository with example code for everything you may want to configure on your IMU. The repo is also baked into Zephyr, and the LSM drivers all seem to call the functions within the linked repo. For context, in Zephyr they're under zephyr/drivers/sensor/st/stmemsc. 

  • Hello, the LSM6DSM does not seem to be supported other than LSM6DSL in nRF Connect SDK v2.8.0. 

    Please reach out to the Zephyr Community on DIscord for more information on Zephyr drivers.

    Kind regards,
    Øyvind

Related