02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Revision:
56:bf08d9e50ccc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AddDetails.cpp	Tue Jul 28 14:40:26 2015 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include <utility>
+#include <string>
+
+extern Serial pc;
+DigitalOut myled(LED1);
+
+string details()                                //not used curr.
+{
+   // pc.printf("Ready to Read.\n");
+   // pc.printf("Enter the number of sensors\n");
+    string details[6];
+    
+   for(int i = 0; i<5 ; i++)
+    {
+         while(1)
+         {
+                if (pc.readable())
+                {
+                    pc.scanf("%s", &details[i]);                  
+                    break;
+                    myled = 1;
+                }
+        }
+    }
+    if (pc.readable())
+    {
+             string start;
+            pc.scanf("%s", start);
+            if (start == "go")
+            {
+             printf("herema");   
+            }
+  
+      return("foo");
+    }   
+}
\ No newline at end of file