Real-time bike tracker using Adafruit Ultimate GPS, Huzzah wifi, and Pubnub

Dependencies:   MBed_Adafruit-GPS-Library mbed

Revision:
2:834f8d2ebe3f
Parent:
1:0701bf58c9fa
Child:
3:ceca81e8ac2b
--- a/Huzzah.cpp	Wed Apr 19 01:00:53 2017 +0000
+++ b/Huzzah.cpp	Thu Apr 20 22:09:06 2017 +0000
@@ -62,7 +62,7 @@
     string r("conn:send(\"");
     r += request + "\")\r\n";
 
-    sprintf(cmdbuff, "conn=net.createConnection(net.TCP, false)\r\n" );
+    sprintf(cmdbuff, "conn=net.createConnection(net.TCP, false)\r\n");
     send_cmd();
     getreply();
     wait(0.2);
@@ -77,13 +77,17 @@
     sprintf(cmdbuff, conn.c_str());
     send_cmd();
     getreply();
-    wait(3.0);
+    wait(2.0);
     sprintf(cmdbuff, r.c_str());
     send_cmd();
     wait(1.0);
     send_cmd();
     getreply();
-    wait(0.2);
+    wait(0.5);
+    
+    sprintf(cmdbuff, "conn.close()\r\n");
+    send_cmd();
+    getreply();
 }
 
 
@@ -263,16 +267,5 @@
     pc.printf(configbuf);
 
     wait(1);
-
-    pc.printf("\n---------- Get Connection Status ----------\r\n");
-    strcpy(configsnd, "print(wifi.sta.status())\r\n");
-    espsendcmd();
-    timeout=5;
-    getreply();
-    pc.printf(configbuf);
-
-    pc.printf("\n\n\n  If you get a valid (non zero) IP, ESP8266 has been set up.\r\n");
-    pc.printf("  Run this if you want to reconfig the ESP8266 at any time.\r\n");
-    pc.printf("  It saves the SSID and password settings internally\r\n");
-    wait(10);
+    return;
 }
\ No newline at end of file