Connect the H3LIS331DL accelerometer via I2C break-out pins on the Razor IMU M0 board

Hi

Do you have an example or tips for adjusting the Razor IMU M0 firmware to log the accelerometer data from the H3LIS331DL. Can I add the arduino library code for the H3LIS331DL to the example firmware of the Razor IMU M0 to communicate with the H3LIS331DL accelerometer? I know that the I2C address for the IMU and the H3LIS331DL accelerometer are different so in theory it should work if I connect it to the breakout I2C pins on the Razor.

The code for each of those looks VERY different; I don’t imagine re-purposing that’ll be easy, but it’s probably possible.

It might be a lot easier to just order/use https://www.sparkfun.com/products/16832 with its logging libraries already intact, if that’s an option.

Best of luck!

Hi

Thank you for the advice.

There’s a accelerometer built into the Razor IMU M0, why not just use the built in one?

Hi

I’m embedding the external H3LIS331DL accelerometer inside a 3D printed rail pad and I want to measure the rail accelerations with the built-in accelerometer of the Razor IMU M0. So I’m attaching the Razor IMU M to the rail and logging data from the H3LIS331DL.

You could connect the two but the razor isn’t going to know what to do with the external sensor. You’d need to modify the firmware on the razor to use both. I’m not seeing any code on the sparkfun site for that, you’d need to write your own to make it work but it’s entirely possible.