IMU and knee angle. No servo yet

Dependencies:   mbed

Fork of FYDP_Final2 by Dave Lu

Committer:
tntmarket
Date:
Wed Mar 25 11:40:32 2015 +0000
Revision:
6:b3baf0fe5b73
Kill dead code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tntmarket 6:b3baf0fe5b73 1 #ifndef DMP_H
tntmarket 6:b3baf0fe5b73 2 #define DMP_H
tntmarket 6:b3baf0fe5b73 3
tntmarket 6:b3baf0fe5b73 4 #include "rtos.h"
tntmarket 6:b3baf0fe5b73 5 #include "MPU6050_6Axis_MotionApps20.h"
tntmarket 6:b3baf0fe5b73 6 #include "IMUDATA.h"
tntmarket 6:b3baf0fe5b73 7 #include "robot.h"
tntmarket 6:b3baf0fe5b73 8
tntmarket 6:b3baf0fe5b73 9 #define PRINT_GYR //uncomment this to print gyro data
tntmarket 6:b3baf0fe5b73 10 //#define PRINT_ACC //uncomment this to print accel data
tntmarket 6:b3baf0fe5b73 11
tntmarket 6:b3baf0fe5b73 12 #define PI 3.1415926
tntmarket 6:b3baf0fe5b73 13
tntmarket 6:b3baf0fe5b73 14 #define DMP_RESET_PIN IMU_RESET_PIN
tntmarket 6:b3baf0fe5b73 15 #define DMP_SDA_PIN IMU_SDA_PIN
tntmarket 6:b3baf0fe5b73 16 #define DMP_NOTUSED_PIN IMU_NOTUSED_PIN
tntmarket 6:b3baf0fe5b73 17 #define MPU_LED_ON LED_ON
tntmarket 6:b3baf0fe5b73 18 #define MPU_LED_OFF LED_OFF
tntmarket 6:b3baf0fe5b73 19
tntmarket 6:b3baf0fe5b73 20 #define DMP_DBG_MSG(...) //bt.printf(__VA_ARGS__); //uncomment this to print debug messages
tntmarket 6:b3baf0fe5b73 21
tntmarket 6:b3baf0fe5b73 22 #define RESET_BAUD_RATE bt.baud(BT_BAUD_RATE);
tntmarket 6:b3baf0fe5b73 23
tntmarket 6:b3baf0fe5b73 24 extern volatile bool mpuInterrupt; //indicates whether interrupt pin has gone high
tntmarket 6:b3baf0fe5b73 25 extern uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
tntmarket 6:b3baf0fe5b73 26 extern uint16_t fifoCount; // count of all bytes currently in FIFO
tntmarket 6:b3baf0fe5b73 27
tntmarket 6:b3baf0fe5b73 28 int test_dmp();
tntmarket 6:b3baf0fe5b73 29 int test_dmp2();
tntmarket 6:b3baf0fe5b73 30 void start_dmp(MPU6050 mpu1); //this will get the DMP ready
tntmarket 6:b3baf0fe5b73 31 void start_dmp2(MPU6051 mpu1); //this will get the DMP ready
tntmarket 6:b3baf0fe5b73 32 void update_dmp(); //call this frequently
tntmarket 6:b3baf0fe5b73 33 void update_dmp2(); //call this frequently
tntmarket 6:b3baf0fe5b73 34 void update_yaw(MPU6050); //this only updates yaw
tntmarket 6:b3baf0fe5b73 35 void update_acc(); //this only updates the acceleration
tntmarket 6:b3baf0fe5b73 36 void calibrate_1();
tntmarket 6:b3baf0fe5b73 37 void calibrate_optFlow();
tntmarket 6:b3baf0fe5b73 38
tntmarket 6:b3baf0fe5b73 39
tntmarket 6:b3baf0fe5b73 40 #endif