NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.

Dependencies:   mbed MODI2C

Revision:
10:953afcbcebfc
Parent:
2:93f703d2c4d7
Child:
11:9bf69bc6df45
--- a/Sensors/Acc/ADXL345.h	Tue Oct 16 10:21:32 2012 +0000
+++ b/Sensors/Acc/ADXL345.h	Wed Oct 17 08:37:08 2012 +0000
@@ -64,14 +64,17 @@
 #define ADXL345_Y           0x01
 #define ADXL345_Z           0x02
 
+#define Rad2Deg         57.295779513082320876798154814105
+
 typedef char byte;
 
 class ADXL345
 {
     public:
         ADXL345(PinName sda, PinName scl); // constructor, uses i2c
-        void read(int a[3]); // read all axis to array
-        
+        void read(); // read all axis to array
+        int data[3]; // where the measured data is saved
+        float angle[3]; // where the calculated angles are stored
        
     private:
         I2C i2c; // i2c object to communicate