Program takes accelerometer and gyroscope data from the MPU6050 registers and calibrates them for better results. Then uses this data is to obtain pitch and roll angles and writes these angles to the terminal which mbed is connected to.

Dependencies:   MPU6050 ledControl2 mbed

Files at this revision

API Documentation at this revision

Comitter:
BaserK
Date:
Wed Aug 05 13:15:31 2015 +0000
Parent:
6:12ff524abb6a
Commit message:
i2c object is static now

Changed in this revision

MPU6050.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 12ff524abb6a -r 3e1e78b34e1a MPU6050.lib
--- a/MPU6050.lib	Wed Aug 05 12:23:06 2015 +0000
+++ b/MPU6050.lib	Wed Aug 05 13:15:31 2015 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/BaserK/code/MPU6050/#20f1f660e5c3
+https://developer.mbed.org/users/BaserK/code/MPU6050/#5b90f2b5e6d9
diff -r 12ff524abb6a -r 3e1e78b34e1a main.cpp
--- a/main.cpp	Wed Aug 05 12:23:06 2015 +0000
+++ b/main.cpp	Wed Aug 05 13:15:31 2015 +0000
@@ -77,7 +77,6 @@
 int main() 
 {
     pc.baud(9600);                              // baud rate: 9600
-    i2c.frequency(400000);                      // fast i2c: 400 kHz
     mpu6050.whoAmI();                           // Communication test: WHO_AM_I register reading 
     wait(1);
     mpu6050.calibrate(accelBias,gyroBias);      // Calibrate MPU6050 and load biases into bias registers