![](/media/cache/group/SAM_2404.JPG.50x50_q85.jpg)
works through pushing box to log data to google spreadsheet
Dependencies: MBed_Adafruit-GPS-Library SDFileSystem mbed
Fork of GPR_Interface by
Diff: GPRS/modem/modem.cpp
- Revision:
- 11:045cb766d9a5
- Parent:
- 10:8c55dfcc9a7c
--- a/GPRS/modem/modem.cpp Fri Sep 25 04:10:56 2015 +0000 +++ b/GPRS/modem/modem.cpp Wed Oct 21 19:41:42 2015 +0000 @@ -161,7 +161,6 @@ void Modem::sendCmdResp(const char* cmd) { serialModem.puts(cmd); - getResp(); } void Modem::getResp() { @@ -177,7 +176,7 @@ timeCnt.stop(); timeCnt.reset(); buffer[count] = '\0'; - printf("%s \n",buffer); + printf("Response:--%s--\r\n",buffer); for(int i = 0; i < count+2; i++) { buffer[i] = NULL; } @@ -221,7 +220,7 @@ while(1) { if(serialModem.readable()) { - char c = serialModem.getc(); + char c = serialModem.getc(); sum = (c==resp[sum]) ? sum+1 : 0; if(sum == len)break; } @@ -231,15 +230,16 @@ return -1; } } + timeCnt.stop(); timeCnt.reset(); - + if(type == CMD) { while(serialModem.readable()) { char c = serialModem.getc(); } + } - return 0; }