-
Notifications
You must be signed in to change notification settings - Fork 279
Home
Jacob Mealey edited this page Mar 17, 2018
·
1 revision
Arduino-MPU6050 is a library to interface with the MPU-6050 I.C. which is a 3-axis gyro, accelerometer and a thermometer. The MPU-6050 I.C. uses I2C in order to communicate with the Arduino. Arduino-MPU6050 uses the wiring library.
You will wire the Arduino to your MPU-6050 device just like you would any other I2C device, pin A5 to SCL and pin A4 to SDA.
In order to work with the Arduino-MPU6050 library you must initialize the MPU6050 object.
MPU6050 mpu;
The data is given in tenths of G's (maybe?)
The way to access the acceleration is using the Vector struct, and the member function Vector readNormalizeAccel(void)
Vector normAccel = mpu.readNormalizeAccel();
Serial.print(normAccel.XAxis);