The sensor accelerometer 9DOF MPU9250 is capable of measuring 9 parameters: 3 axis Rotation angle (Gyro), 3 axis acceleration acceleration (Accelerometer) and 3 axes magnetic field (Magnetometer) with a single sensor is MPU9250 ( Upgraded versions of MPU6050) are very popular today.
The sensor accelerometer 9DOF MPU9250 is applied in many different projects: pendulum pendulum, self-balancing vehicle, drone, ...
SPECIFICATIONS:
Instruction for using MPU 9250 with Arduino:
Connect:
MPU9250 UNO R3 MEGA VIN 5V 5V GND GND GND SCL A5 SCL SDA A4 SDA
Download libary for MPU9250.h
Code for MPU9250
#include "MPU9250.h"
// an MPU9250 object with the MPU-9250 sensor on I2C bus 0 with address 0x68
MPU9250 IMU(Wire,0x68);
int status;
void setup() {
// serial to display data
Serial.begin(115200);
while(!Serial) {}
// start communication with IMU
status = IMU.begin();
if (status < 0) {
Serial.println("IMU initialization unsuccessful");
Serial.println("Check IMU wiring or try cycling power");
Serial.print("Status: ");
Serial.println(status);
while(1) {}
}
}
void loop() {
// read the sensor
IMU.readSensor();
// display the data
Serial.print(IMU.getAccelX_mss(),6);
Serial.print("t");
Serial.print(IMU.getAccelY_mss(),6);
Serial.print("t");
Serial.print(IMU.getAccelZ_mss(),6);
Serial.print("t");
Serial.print(IMU.getGyroX_rads(),6);
Serial.print("t");
Serial.print(IMU.getGyroY_rads(),6);
Serial.print("t");
Serial.print(IMU.getGyroZ_rads(),6);
Serial.print("t");
Serial.print(IMU.getMagX_uT(),6);
Serial.print("t");
Serial.print(IMU.getMagY_uT(),6);
Serial.print("t");
Serial.print(IMU.getMagZ_uT(),6);
Serial.print("t");
Serial.println(IMU.getTemperature_C(),6);
delay(100);
}
update
...