# IMU 9DOF v2.0 (MPU-9250)

The IMU 9DOF v2.0 is a high-performance 9-axis motion tracking module based on MPU-9250 and supports both I2C and SPI interface. In this tutorial, you'll learn how to run an application with the I2C interface, which is the default setting of the module. For details, refer to [the official WiKi page](http://wiki.seeed.cc/Grove-IMU_9DOF_v2.0/) of this component.

You can see how to download and install the driver by referring to:

* [How to install driver](https://docs.labs.mediatek.com/resource/linkit7697-arduino/en/kits-and-shields/grove-starter-kit)
* [Driver repository](https://github.com/MediaTek-Labs/linkit-7697-peripheral-drivers-for-arduino)

After the installation is done, follow the steps below to use this component.

### Setup and Execution <a href="#imu9dofv2.0-mpu-9250-setupandexecution" id="imu9dofv2.0-mpu-9250-setupandexecution"></a>

1. Connect the module to the **I2C** header of the LinkIt 7697 breakout board.
2. Select the **File / Examples / Grove\_IMU\_9DOF\_9250 / IMU9DOF\_Demo\_Compass\_Calibrated** menu.
3. Click the **Upload** icon to compile and upload the sketch file to the board.
4. Open the serial monitor (with baud rate **38,400**) and reset the board to execute the application. You should be able to see the output as shown below:

![](https://3972650740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY4gduUSLWOCI23CXUWej%2Fuploads%2FlpCm4fxwZeJ8F9F3dD6U%2F9dof_screenshot.png?alt=media\&token=f3a95799-68a2-412f-8c44-3f316d920005)

### Reference <a href="#imu9dofv2.0-mpu-9250-reference" id="imu9dofv2.0-mpu-9250-reference"></a>

If you're using sources from the repositories of module vendors:

* [Grove - IMU 9DOF v2.0 library](https://raw.githubusercontent.com/SeeedDocument/Grove-IMU_9DOF_v2.0/master/res/Grove_IMU_9DOF_9250.zip) and,&#x20;
* the I2CDev and MPU9250 library (<https://github.com/Seeed-Studio/IMU_10DOF>).

Please follow the steps to modify the codes for making it available to the LinkIt 7697:

1. Open the **IMU\_10DOF-master/MPU9250.h** file from the library folder.
2. Comment out **line 41**:

   ```
   #ifndef _MPU9250_H_
   #define _MPU9250_H_ 
    
   #include "I2Cdev.h" 
   //#include <avr/pgmspace.h>
    
   //Magnetometer Registers
   #define MPU9150_RA_MAG_ADDRESS 0x0C
   ```
3. Save the file.
