Pipeline Technology Centre / Mbed 2 deprecated ConsolTest

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AddDetails.cpp Source File

AddDetails.cpp

00001 #include "mbed.h"
00002 #include <utility>
00003 #include <string>
00004 
00005 extern Serial pc;
00006 DigitalOut myled(LED1);
00007 
00008 string details()                                //not used curr.
00009 {
00010    // pc.printf("Ready to Read.\n");
00011    // pc.printf("Enter the number of sensors\n");
00012     string details[6];
00013     
00014    for(int i = 0; i<5 ; i++)
00015     {
00016          while(1)
00017          {
00018                 if (pc.readable())
00019                 {
00020                     pc.scanf("%s", &details[i]);                  
00021                     break;
00022                     myled = 1;
00023                 }
00024         }
00025     }
00026     if (pc.readable())
00027     {
00028              string start;
00029             pc.scanf("%s", start);
00030             if (start == "go")
00031             {
00032              printf("herema");   
00033             }
00034   
00035       return("foo");
00036     }   
00037 }