final product

Dependencies:   FRDM_MMA8451Q mbed

Fork of mbed_Pedometer_pressup by Costa

Files at this revision

API Documentation at this revision

Comitter:
eddytomhall
Date:
Fri Jun 17 12:12:38 2016 +0000
Parent:
6:c02bbe512cdc
Commit message:
FINAL FINAL

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c02bbe512cdc -r 65643a8602ed main.cpp
--- a/main.cpp	Fri Jun 17 10:17:45 2016 +0000
+++ b/main.cpp	Fri Jun 17 12:12:38 2016 +0000
@@ -131,7 +131,7 @@
     // resp=OKResponse(buffer,"OK");
 //   if (resp!=NULL) {
     INFO("Ready 10");
-    dev.printf("AT+CIPSEND=4,4\r\n");
+    dev.printf("AT+CIPSEND=4,8\r\n");
     wait(0.1);
 
 
@@ -144,7 +144,7 @@
     INFO("SENDING");
 
     wait(0.2);
-    dev.printf("%02u\r\n",zcount);
+    dev.printf("PED:%02u\r\n",zcount);
 }
 
 void pc_recv()
@@ -297,7 +297,7 @@
                         wait(0.1);
 
                     }
-                    wait(0.1);
+                    wait(0.5);
                     //  while (OKResponse(buffer,">")!=NULL){
                     //   printf(".\r\n");
                     //  wait(1);
@@ -305,7 +305,7 @@
 
                     INFO("SENDING");
 
-                    wait(0.2);
+                    wait(0.5);
                     dev.printf("PEDOMETER\r\n");
                     state++;      //send greeting to server
                     break;
@@ -319,7 +319,7 @@
                                
                                 if (z<0.0) {
                                     a=0.0;
-                                    
+                                    pc.printf("fuck");
                                     zcount++;
 
                                     sendinfo();