An fully working IMU-Filter and Sensor drivers for the 10DOF-Board over I2C. All in one simple class. Include, calibrate sensors, call read, get angles. (3D Visualisation code for Python also included) Sensors: L3G4200D, ADXL345, HMC5883, BMP085

Dependencies:   mbed

Revision:
4:f62337b907e5
Parent:
1:798db5deb8b9
--- a/IMU/IMU_10DOF.h	Tue Aug 27 22:18:25 2013 +0000
+++ b/IMU/IMU_10DOF.h	Thu Aug 29 13:52:30 2013 +0000
@@ -7,15 +7,20 @@
 #include "L3G4200D.h"   // Gyro (Gyroscope)
 #include "ADXL345.h"    // Acc (Accelerometer)
 #include "HMC5883.h"    // Comp (Compass)
-#include "IMU_Filter.h" // Class to calculate position angles
+#include "BMP085.h"     // Alt (Altitude sensor or Barometer)
+#include "IMU_Filter.h" // Class to calculate position angles  (algorithm from S.O.H. Madgwick, see header file for info)
 
 class IMU_10DOF
 {           
     public:
         IMU_10DOF(PinName sda, PinName scl);
-        void read();                    // read all axis from register to array data
+        void readAngles();              // read all axis from register to array data
+        void readAltitude();            // read all axis from register to array data
         
-        float * angle;                  // where the measured and calculated angles are saved
+        float * angle;                  // where the measured and calculated data is saved
+        float temperature;
+        float pressure;
+        float altitude;
         
         float dt;                       // local time to calculate processing speed for entire loop and just reading sensors
         float dt_sensors;               // |
@@ -27,6 +32,8 @@
         L3G4200D    Gyro;               // All sensors Hardwaredrivers
         ADXL345     Acc;
         HMC5883     Comp;
+        BMP085      Alt;
+        
         IMU_Filter  Filter;             // Filterclass to join sensor data
 };