wei zou
/
Mbed_Shield_GPRS_AT_Command_Test
this is a AT command test on Mbed Shield
main.cpp
#include "mbed.h" Serial gprs(p28,p27); Serial pc(USBTX,USBRX); int main() { char buffer[64]; int count = 0; pc.baud(19200); gprs.baud(19200); while(1) { if(gprs.readable()) { while(gprs.readable()) { char c = gprs.getc(); buffer[count++] = c; if(count == 64) break; } pc.puts(buffer); for(int i = 0; i < count; i++) { buffer[i] = NULL; } count = 0; } if(pc.readable()) { gprs.putc(pc.getc()); } } }
mbed.bld@0:c310471929e7, 2013-11-20 (annotated)
- Committer:
- lawliet
- Date:
- Wed Nov 20 07:53:14 2013 +0000
- Revision:
- 0:c310471929e7
Initial verison of testing AT Commands on Mbed Shield
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lawliet | 0:c310471929e7 | 1 | http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f |