Device to measure angle and get IMU measurements.

Dependencies:   mbed commands BLE_API nRF51822

Revision:
5:46947b447701
Parent:
4:2a5a08b14539
Child:
6:75263c93daf7
--- a/main.cpp	Wed Jun 03 15:10:45 2015 +0000
+++ b/main.cpp	Sun Jun 07 14:11:26 2015 +0000
@@ -1,14 +1,12 @@
 #include "mbed.h"
 #include "Controller.h"
 
-Serial pc(USBTX, USBRX);
 
 //Ticker ticker;
 
 //InterruptIn   button(p23);
 volatile int ledBlink = 0; 
 
-
 /*
 
 void ledInt(){
@@ -36,46 +34,13 @@
 */
 
 int main(void)
-{
-    pc.baud(19200);
+{   
+    wait(1);
     Controller* goniometer = new Controller();
-    
-    /*
-    button.fall(&buttonInt);
-    
-    led = 0;
-    */
     wait(0.01);
     
     while(true) {
-        
-        if(pc.readable()){
-            
-            char command = pc.getc();
-            
-            switch(command){
-                case '1':
-                    pc.printf("een\n");
-                    goniometer->setCommand(0);
-                    break;
-                case '2':
-                    pc.printf("twee\n");
-                    goniometer->setCommand(1);
-                    break;
-                case '3':
-                    pc.printf("drie\n");
-                    goniometer->setCommand(2);
-                    break;
-                case '4':
-                    pc.printf("vier\n");
-                    goniometer->setCommand(3);
-                    break;
-                case '5':
-                    pc.printf("vijf\n");
-                    goniometer->setCommand(4);
-                    break;
-                }
-            }
+        goniometer->run();
     }
 }