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.
Fork of ESP8266Interface by
Revision 50:3a97d8af5177, committed 2016-06-24
- Comitter:
- hank51017
- Date:
- Fri Jun 24 05:09:07 2016 +0000
- Parent:
- 49:2c05d747bb91
- Commit message:
- reset change
Changed in this revision
| ESP8266/ESP8266.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ESP8266/ESP8266.cpp Tue Jul 14 09:09:55 2015 +0000
+++ b/ESP8266/ESP8266.cpp Fri Jun 24 05:09:07 2016 +0000
@@ -65,7 +65,7 @@
bool ESP8266::join()
{
- sendCommand( "AT+CWMODE=1", "change", NULL, 1000);
+ sendCommand( "AT+CWMODE=1", "OK", NULL, 1000);
string cmd="AT+CWJAP=\""+(string)this->ssid+"\",\""+(string)this->phrase+"\"";
if( sendCommand( cmd.c_str(), "OK", NULL, 10000) ) {
// successfully joined the network
@@ -291,9 +291,12 @@
//send("+++",3);
wait(1);
state.cmdMode = true;
- sendCommand("AT", "OK", NULL, 1000);
- sendCommand("AT+RST", "ready", NULL, 10000);
+ if(sendCommand("AT", "OK", NULL, 1000) != true)
+ printf("ERROR \r\n");
+ if(sendCommand("AT+RST", "ready", NULL, 10000) !=true)
+ printf("ERROR reset\r\n");
state.associated = false;
+ reset_pin = 0;
}
