This is example of ANGLE.lib. We get angle that make from L3GD20 and ADXL345.

Dependencies:   mbed-rtos mbed

Revision:
0:acbe7732f472
Child:
1:1d8421cca595
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Nov 30 11:07:57 2014 +0000
@@ -0,0 +1,34 @@
+ #include "mbed.h"
+ #include "rtos.h"
+/* #include "ADXL345.h"
+ #include "kalman.h" 
+ #include "L3GD20.h"*/
+ #include "angle.h"
+ANGLE angle(p28, p27);
+Serial pc(USBTX, USBRX);
+Ticker T;
+void led2_thread(void const *argument) {
+    while (true) {
+        angle.set_angle();
+        Thread::wait(0.001);
+    }
+}
+
+int main(){
+    double g[3];
+    Thread thread(led2_thread);
+    //double angle[3];
+    int d[3];
+    short rate[3];
+    Thread::wait(1.0);
+    //T.attach(&angle,&ANGLE::set_angle,0.001);
+    while(1)
+        {
+            //gyro.get_rate(g,g+1,g+2);
+            angle.get_Comp_angle(g,g+1);
+            pc.printf("%lf, %lf, %lf\n", g[0], g[1], g[2]);
+            
+        }
+}
+
+