Code for our FYDP -only one IMU works right now -RTOS is working

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DMP.h Source File

DMP.h

00001 #ifndef DMP_H
00002 #define DMP_H
00003 
00004 #include "MPU6050_6Axis_MotionApps20.h"
00005 #include "IMUDATA.h"
00006 #include "robot.h"
00007 
00008 #define PRINT_GYR     //uncomment this to print gyro data
00009 //#define PRINT_ACC     //uncomment this to print accel data
00010 
00011 #define PI 3.1415926
00012 
00013 #define DMP_RESET_PIN           IMU_RESET_PIN
00014 #define DMP_SDA_PIN             IMU_SDA_PIN
00015 #define DMP_NOTUSED_PIN         IMU_NOTUSED_PIN
00016 #define  MPU_LED_ON              LED_ON  
00017 #define  MPU_LED_OFF             LED_OFF      
00018 
00019 #define DMP_DBG_MSG(...)        //bt.printf(__VA_ARGS__);   //uncomment this to print debug messages
00020 
00021 #define  RESET_BAUD_RATE        bt.baud(BT_BAUD_RATE);     
00022     
00023 extern volatile bool mpuInterrupt; //indicates whether interrupt pin has gone high
00024 extern uint16_t packetSize;    // expected DMP packet size (default is 42 bytes)
00025 extern uint16_t fifoCount;     // count of all bytes currently in FIFO
00026 
00027 int test_dmp();
00028 int test_dmp2();
00029 void start_dmp(MPU6050 mpu1);    //this will get the DMP ready
00030 void start_dmp2(MPU6051 mpu1);    //this will get the DMP ready
00031 void update_dmp();   //call this frequently
00032 void update_dmp2();   //call this frequently
00033 void update_yaw(MPU6050);   //this only updates yaw
00034 void update_acc();   //this only updates the acceleration
00035 void calibrate_1();
00036 void calibrate_optFlow();
00037 
00038 
00039 #endif