kriswiner / MPU9250

Arduino sketches for MPU9250 9DoF with AHRS sensor fusion
1.04k stars 471 forks source link

Simple Magnetometer and Accelerometer readings #138

Open petkool opened 7 years ago

petkool commented 7 years ago

Hi Kris,

I am building a land robot for a school project and bought the Sparkfun MPU-9250 IMU. My level of arduino knowledge is not the best, but I am having trouble understanding your library. I intend to do things:

  1. Calculate a rough estimate of linear velocity using accelerometer values.

  2. Using the magnetometer readings to get a compass heading.

Do let me know if you have any idea on how to achieve my tasks with your library.

Thanks.

kriswiner commented 7 years ago

Did you look here?

https://github.com/kriswiner/MPU-9250/blob/master/MPU9250_MS5637_AHRS_t3.ino

This sketch prodces quaternions from which heading (and pitch and roll) as well as linear acceleration adn gravity are derived.

On Sat, Apr 8, 2017 at 7:57 AM, petkool notifications@github.com wrote:

Hi Kris,

I am building a land robot for a school project and bought the Sparkfun MPU-9250 IMU. My level of arduino knowledge is not the best, but I am having trouble understanding your library. I intend to do things:

1.

Calculate a rough estimate of linear velocity using accelerometer values. 2.

Using the magnetometer readings to get a compass heading.

Do let me know if you have any idea on how to achieve my tasks with your library.

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU-9250/issues/138, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qrOTAtSiwD_7UlTMZapqBkvC4Qwuks5rt6BsgaJpZM4M3ueu .

petkool commented 7 years ago

Hi Kris,

I tried the code and i seem to be getting alot of errors. I think it is because it is optimized for Teensy

kriswiner commented 7 years ago

Probably the i2c_t3.h library instead of the Wire.h library.

On Tue, Apr 11, 2017 at 4:47 AM, petkool notifications@github.com wrote:

Hi Kris,

I tried the code and i seem to be getting alot of errors. I think it is because it is optimized for Teensy

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU-9250/issues/138#issuecomment-293232626, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qougWDsd688bnFz1dxofFGsPqI9Mks5ru2hYgaJpZM4M3ueu .