Josef Humer / Mbed 2 deprecated TTSMCU6050

Dependencies:   mbed rijo-mpu6050 MPU6050

Revision:
0:c1875ecb8b79
diff -r 000000000000 -r c1875ecb8b79 rijompu6050.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rijompu6050.cpp	Sat Oct 10 01:25:32 2015 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "MPU6050.h"
+Serial thinkdesk(USBTX, USBRX);
+int16_t ax, ay, az;
+int16_t gx, gy, gz;
+MPU6050 mpu(p9,p10);
+
+
+int main()
+{
+
+bool ok ;
+ok = mpu.testConnection(); 
+if(ok)
+{
+thinkdesk.printf("Test is ok!\n");
+mpu.setSleepMode(0); //THIS WILL GET THE SENSOR OUT OF SLEEP MODE.
+}
+else
+thinkdesk.printf("Test failed!\n");
+float data[3];
+while(1)
+{
+mpu.getAccelero( data );
+wait(1);
+thinkdesk.printf("%f;%f;%f;\n",data[0],data[1],data[2]);
+}
+}
+
+
+
+