Connect your MPU to the Arduino.
Connect the VCC to the 3.3V Arduino power supply.
Connect the GND to the Arduino ground.
We are using an Arduino Mega, so we have used the respective SDA/SCL ports. SDA->SDA, SCL>SCL.
Install the MPU Library
From the ‘tools’ menu in the Arduino IDE, select ‘Manage Libraries’.
In the search bar, type ‘MPU’. This will narrow your search to a library created by Brian Taylor.
To open the example code in the library. go to ‘File>Examples>Bolder Flight Systems MPU9250’ and open ‘Advanced_I2c’
Now upload this code to your Arduino. Ensure you are using the correct port and board settings in ‘Tools’.
Open the ‘Serial Monitor’. You may need to change the baud rate in the erial monitor to ‘115200’.
You should see the following.