Tuna Shields / Mbed 2 deprecated FONA_CellPhone

Dependencies:   mbed

Fork of FONA_CellPhone by Dream Team

Files at this revision

API Documentation at this revision

Comitter:
arturogasca
Date:
Mon Sep 25 17:51:42 2017 +0000
Parent:
17:b01377595122
Commit message:
ejemplo basico fona

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r b01377595122 -r c7c5d9bba2fb main.cpp
--- a/main.cpp	Wed Mar 30 16:19:51 2016 +0000
+++ b/main.cpp	Mon Sep 25 17:51:42 2017 +0000
@@ -35,10 +35,11 @@
 //#include "SoftSerial.h" I dont think we need this
 #include "Adafruit_FONA.h"
 
-#define FONA_RST p12
-#define FONA_TX p13
-#define FONA_RX p14
-#define FONA_RI p11
+
+#define FONA_RST D2
+#define FONA_TX D1
+#define FONA_RX D0
+#define FONA_RI A5
 
 // this is a large buffer for replies
 char replybuffer[255];
@@ -769,14 +770,14 @@
     
     while (true) {
         if (buffidx > maxbuff) {
-            //pcSerial.printf("SPACE\r\n");
+            pcSerial.printf("SPACE\r\n");
             break;
         }
         
         while(pcSerial.readable()) {
             char c =  pcSerial.getc();
             
-            //pcSerial.printf("%02x#%c\r\n", c, c);
+            pcSerial.printf("%02x#%c\r\n", c, c);
             
             if (c == '\r') continue;
             if (c == 0xA) {
@@ -792,7 +793,7 @@
         }
         
         if (timeoutvalid && timeout == 0) {
-            //pcSerial.printf("TIMEOUT\r\n");
+            pcSerial.printf("TIMEOUT\r\n");
             break;
         }
         wait_ms(1);