cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSOX Example

matheusprom
Associate

Hi, I'm developing a project with a NUCLEO-WB55RG and I need to to communicate with a STEVAL-MKI197V1. I'm using the CUBE IDE v1.13.1 and the X-CUBE-MEMS1 v10.0.0. But I'm having a problem when trying to initiate the library calling LSM6DSOX_Init function the program gives me a Hard Fault. I'm trying to use a SPI to communicate with the module.

Is there any examples I can use as guide?

 

2 REPLIES 2
Federica Bossi
ST Employee

Hi @matheusprom ,

Welcome to ST Community!

You could look at the FP-SNS-MOTENVWB1 function pack that  connects your IoT node to a smartphone via Bluetooth Low Energy (BLE) and uses a suitable Android or iOS application such as the STBLESensor app to view real-time motion, environmental (temperature, pressure and relative humidity), and Time-of-Flight sensor data.

Let me know if this helps.

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.
matheusprom
Associate

Hi Federica,

Thanks for your answer.

I've been looking this function pack you suggested, but I'm having some trouble finding how to make it work with a SPI instead of the I2C. I can't use it as it is because I don't own a X-NUCLEO-IKS01A3 or a X-NUCLEO-IKS4A1, so I'm making some adaptation to communicate with my NUCLEO-WB55RG.

Searching throught the FP-SNS-MOTENVWB1 function pack, I could understand better how it uses the lsm6dsox library. But to make it work with the SPI protocol I'll have to adapt some functions to make it works(the whole lsm library looks to work better with a I2C, as some function pointers doesn't fit for the SPI functions as it is).

It may take some more time, but if anything appears, I'll come back here to ask you.