final product
Dependencies: FRDM_MMA8451Q mbed
Fork of mbed_Pedometer_pressup by
Diff: main.cpp
- Revision:
- 7:65643a8602ed
- Parent:
- 6:c02bbe512cdc
--- 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();