Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
This branch is 3 commits ahead, 1 commit behind sparkfun:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

SparkFun MPU-9250 Digital Motion Processor (DMP) Arduino Library

I have forked this repository to edit and make changes for the ESP32. Will submit a PR when ready. This is a Work in Progress

SparkFun MPU-9250

SparkFun MPU-9250 (SEN-13762)

Advanced Arduino library for the Invensense MPU-9250 inertial measurement unit (IMU), which enables the sensor's digital motion processing (DMP) features. Along with configuring and reading from the accelerometer, gyroscope, and magnetometer, this library also supports the chip's DMP features like:

  • Quaternion calculation
  • Pedometer
  • Gyroscope calibration
  • Tap detection
  • Orientation dtection

For help getting started with this library, refer to the Using the MPU-9250 DMP Arduino Library section of the 9DoF Razor IMU M0 Hookup Guide.

Note: This library currently only supports and is tested on SAMD processors. It's a major part of the SparkFun 9DoF Razor IMU M0 firmware.

If you're looking for an AVR-compatible (Arduino Uno, SparkFun RedBoard, etc.) library, check out the SparkFun MPU-9250 Breakout Library, which provides access to all standard MPU-9250 sensor-readings.

Repository Contents

  • /examples - Example sketches for the library (.ino). Run these from the Arduino IDE.
  • /src - Source files for the library (.cpp, .h).
    • /src/util - Source and headers for the MPU-9250 driver and dmp configuration. These are available and adapted from Invensene's downloads page.
  • keywords.txt - Keywords from this library that will be highlighted in the Arduino IDE.
  • - General library properties for the Arduino package manager.


Products that use this Library

Version History

License Information

This product is open source!

Please review the file for license information.

If you have any questions or concerns on licensing, please contact

Distributed as-is; no warranty is given.

  • Your friends at SparkFun.


Arduino library for the MPU-9250 enabling its digital motion process (DMP) features.







No packages published


  • C 85.5%
  • C++ 14.5%