Raw acceleration Data from LSM9DS1

Hi everyone,

I have a project where I am trying to consistantly have the same length of data saved on a SD-card. I have Everything working fine the only problem I have is that I would like to read the raw acceleration and gyro data. By that I mean I would like to read the data in Bits rather than in G or dps. Does anyone have an idea how I could do that?

Thanks in advance!

Tristan

Welcome to the forum.

Just install the Arduino_LSM9DS1 library in the IDE using the library manager.

Then go to your project folder and find the libraries folder inside. There you will find the library. The source code is short and easy to understand.

The read readRegister function allows you to read the registers of the sensor. You have two choices.

  • Modify the header file to get access to the functions because they are private and therefore only available inside the LSM9DS1Class. Then you can use the functions in your sketch.

  • Or extend the class with your own functions and use the readRegister function as is only inside the class.

Hi Klaus,

Thank you for your reply!

I got it working by modifying thereadRegister function!

1 Like

Hey,
I’m struggling with the same issue, but I can’t manage to get the right function. I made my own function. But it didn’t work. May you help me out, and show how you edited the registers in order to get the raw data? I would appreciate it a lot

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.