6-Axis Accelerometer



Hey guys!

I just bought myself a GrovePi+ aswell as a Raspberry Pi 3 B+. I wanted to read the acceleration aswell as the tilt grade of my 6-Axis Accelerometer and Gyroscope

Do you any of you have any tips or a fitting library?


Hi @dzimmer,

This looks like it might work:

Thank you!


Both the interface module pointed to for the LSM6DS3, and the DI sensor interface for the DI IMU provide linear and angular acceleration and Euler values, (and DI even provides quaternions for super-robots and Mensa honorees that can think in four imaginary dimensions).

I’m guessing ordinary thinking robots will need to spawn a process to periodically log the change data and the time since last reading, and have a set of logged data interface functions from the simple to rocket science level?

Any demo code for the GoPiGo with IMU that

  • outputs cumulative x,y or R-theta since a zero point?
  • outputs current orientation since a zero of pointing angle?

Forty-five years ago, I did well in my Physics 1 class with d=1/2 a t-squared, but I really don’t remember how I managed to pass Differential Equations. (I do remember imagining that I could analyze the springs and shock absorbers for a 65 Corvette, and I remember that my hardest class was fluid mechanics that used Euler equations.

Looking at the DI IMU and the LSM6DS3 interface, I just had a nightmare that I was back in school having to use Euler equations. I knew there had to be a reason my robot can’t figure out where it has been.


Hello @RobertLucian
Thank you for your quick response! I am going to try it out.

Thank you!