working code

Dependencies:   mbed

Fork of Client_Code_Rangefinder by James Cochrane

Files at this revision

API Documentation at this revision

Comitter:
jcochra
Date:
Fri Jun 10 10:37:56 2016 +0000
Parent:
7:1119c6781d17
Commit message:
WORKING CODE;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jun 10 09:51:57 2016 +0000
+++ b/main.cpp	Fri Jun 10 10:37:56 2016 +0000
@@ -238,13 +238,13 @@
                 case 9: { resp=OKResponse(buffer,"OK");
                     if (resp!=NULL) {
                        INFO("Ready");
-                       wait(2);
+                       wait(0.2);
                        char buf[32];
                        range = obstruction_finder();
-                       sprintf(buf,"Range=%04d\r\n",range);
+                       sprintf(buf,"OB=%01d\r\n",range);
                         //dev.printf("AT+CIPSERVER= 1,6060"); 
                        dev.printf("AT+CIPSEND=0,%d\r\n",strlen(buf));  //10 = length of string being sent
-                       wait(2);
+                       wait(0.2);
                         dev.printf("%s",buf);  //10 = length of string being sent
                      //range=(range++)%6000;