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.
Dependencies: DebouncedIn mbed
Diff: main.cpp
- Revision:
- 1:6b506dde0a6e
- Parent:
- 0:edc50cf04b46
--- a/main.cpp Mon Dec 01 04:54:29 2014 +0000
+++ b/main.cpp Tue Dec 02 03:41:43 2014 +0000
@@ -20,13 +20,15 @@
int position=0;
int lenpack=6;
int longi=0;
-char tel[10];
+char tel[11];
char DE[50];
-char buffer[512];
+char buffer[100];
+char datos[100];
char NUMBER[13];
int index;
int count;
int i = 0;
+int j = 0;
int c=0;
unsigned char CtrlZ = 0x1A; // comodin de emision controlZ
bool Flag = false; // bandera
@@ -354,6 +356,25 @@
LedVerde=0;
}
-}
+}
+ if(GSM.readable()) { //USE ESTE FRAGMENTO DE CODIGO PARA LEER LO QUE EL CELULAR RESPONDE
+ while(GSM.readable()) {
+ char c = GSM.getc();
+ buffer[count++] = c;
+ if(count == 64) break;
+ }
+ pc.puts(buffer);
+
+
+ for(int i = 0; i < count; i++) {
+ buffer[i] = NULL;
+ }
+
+ count = 0;
+
+ }
+
}
-}
\ No newline at end of file
+}
+
+// buffer[i] contiene lo que regresa
\ No newline at end of file