Skip to main content
Associate II
May 26, 2024
Solved

[IMU] Talking to sensors on sensor hub

  • May 26, 2024
  • 4 replies
  • 3018 views

So i have a LSM6DSOX and connected to its sensor hub LIS3MDL.

Currently I'm trying to log data to feed into the NanoEdge studio.  So i need to grab data from the actual LIS3MDL.

On the sensor hub you can read and write registers through the sensor hub correct?

This topic has been closed for replies.
Best answer by Federica Bossi

Hi @BA_ ,

On github you can find some official examples on how to implement sensor hub using LSM6DSOX and LIS2MDL. You can use them as starting point.

Hope this helps :)

4 replies

BA_Author
Associate II
May 26, 2024

So you set the address to be a read or write SLV0_ADD (15h)

Then with SLV0_SUBADD (16h) you can set the register

Then this is used to write the value DATAWRITE_SLV0 (21h)

But i don't know how a data read works.  Also not sure how you read more then one sensor?

 

 

BA_Author
Associate II
May 26, 2024

The read somehow comes from the SENSOR_HUB_1-18

Federica Bossi
Federica BossiBest answer
ST Technical Moderator
May 29, 2024

Hi @BA_ ,

On github you can find some official examples on how to implement sensor hub using LSM6DSOX and LIS2MDL. You can use them as starting point.

Hope this helps :)

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
BA_Author
Associate II
June 2, 2024