Example to use MPU6050 library. This project contains usage of DMP and way to get raw values from the sensor. I ported here from this arduino's project https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples. See here if you want try visualization of sensor values. To get move this program, we need to connect pinName 27 to "SCL" pin, pinName 28 to "SDA" pin, and pinName 29 to "INT" pin of MPU6050.

Dependencies:   mbed MPU6050

Committer:
syundo0730
Date:
Sun Jan 31 14:12:13 2016 +0000
Revision:
2:42c4f3a7813f
Parent:
1:ec0a08108442
integrated the example for DMP and raw value

Who changed what in which revision?

UserRevisionLine numberNew contents of line
syundo0730 2:42c4f3a7813f 1 //#include "MPU6050_DMP6.h"
syundo0730 0:8d2c753a96e7 2 //
syundo0730 2:42c4f3a7813f 3 //int main() {
syundo0730 2:42c4f3a7813f 4 // MPU6050DMP6::setup();
syundo0730 2:42c4f3a7813f 5 // while(1) {
syundo0730 2:42c4f3a7813f 6 // MPU6050DMP6::loop();
syundo0730 2:42c4f3a7813f 7 // }
syundo0730 2:42c4f3a7813f 8 //}
syundo0730 0:8d2c753a96e7 9
syundo0730 2:42c4f3a7813f 10 #include "MPU6050_raw.h"
syundo0730 0:8d2c753a96e7 11
syundo0730 0:8d2c753a96e7 12 int main() {
syundo0730 2:42c4f3a7813f 13 MPU6050raw::setup();
syundo0730 0:8d2c753a96e7 14 while(1) {
syundo0730 2:42c4f3a7813f 15 MPU6050raw::loop();
syundo0730 0:8d2c753a96e7 16 }
syundo0730 0:8d2c753a96e7 17 }