Elektronikprojekt Grupp 13 / Mbed OS test_fft_grp13

Dependencies:   mbed-dsp

Fork of mbed-os-example-blinky by Elektronikprojekt Grupp 13

Revision:
45:b1b431753adc
Parent:
43:d3f8e93d85f0
Parent:
44:7f2c1e8d0761
Child:
46:5ad0d78d045e
--- a/main.cpp	Wed Mar 29 14:55:21 2017 +0000
+++ b/main.cpp	Wed Mar 29 15:09:04 2017 +0000
@@ -2,12 +2,31 @@
 
 DigitalOut led1(LED1);
 
+// State machine
+int    STATE;
+const int NONE     = -1;
+const int TEST  = 0;
+const int SEND     = 1;
+const int DSP1     = 2;
+const int DSP2     = 3;
+const int DSP3     = 4;
+const int WAIT     = 9;
+
 // main() runs in its own thread in the OS
 int main() {
+    STATE = NONE;
     while (true) {
-        led1 = !led1;
-        //ändrade värdet från 0.5 till 0.6
-        wait(2);
+        switch (STATE) {
+            
+            case SEND:
+            //send code here
+            break;
+            
+            case TEST:
+            //code here
+            break; 
+            
+            }
     }
 }
 //Calculating distanse between sound and camera