Paul Jeon
/
GSMTest2PICO-ece493
works!
Revision 2:5e5cdc3504fe, committed 2020-02-21
- Comitter:
- kchhouk
- Date:
- Fri Feb 21 21:03:41 2020 +0000
- Parent:
- 1:6e512faaa17c
- Commit message:
- Added the functionality of scanf
Changed in this revision
GSMTest2PICO.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6e512faaa17c -r 5e5cdc3504fe GSMTest2PICO.cpp --- a/GSMTest2PICO.cpp Fri Feb 21 20:40:56 2020 +0000 +++ b/GSMTest2PICO.cpp Fri Feb 21 21:03:41 2020 +0000 @@ -12,6 +12,7 @@ // Serial pc(USBTX, USBRX); char buf[40]; char buf1[40]; +char sstr[40]; long GSMBAUD = 9600; // long PCBAUD = 9600; @@ -19,8 +20,9 @@ { // Initialise the digital pin LED1 as an output //DigitalOut led(LED1); - SIM800L.baud(GSMBAUD); + microUSB.scanf("%s", sstr); + //microUSB.scanf("%s", buf); SIM800L.puts("AT\r\n"); SIM800L.scanf("%s", buf);