Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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);
