Components / ESP8266

Dependencies:   ATParser

Dependents:   ESP8266Interface

Fork of ESP8266 by NetworkSocketAPI

Files at this revision

API Documentation at this revision

Comitter:
sarahmarshy
Date:
Wed Aug 05 21:57:41 2015 +0000
Parent:
12:2c5afb36bc8c
Child:
14:13cef05d740c
Commit message:
Waits added for send command, and actual data sent

Changed in this revision

ESP8266.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/ESP8266.cpp	Mon Jul 27 15:25:47 2015 +0000
+++ b/ESP8266.cpp	Wed Aug 05 21:57:41 2015 +0000
@@ -116,10 +116,12 @@
     sprintf(lenstr,"%d",(int)amount);
 
     string send_command = "AT+CIPSEND="+(string)idstr+","+(string)lenstr;
-    if(!atParser.send(send_command.c_str(), ">")) {
+    if(!atParser.send(send_command.c_str(),">")) {
         return false;
     }
+    wait_ms(10);
     atParser.write((char*)data, (int)amount);
+    wait_ms(10);
     return true;
 }