.kgj
Dependencies: DS3231 RHT03 TextLCD mbed
Fork of HomeStatus by
Revision 4:33cfa6f20f2f, committed 2015-06-02
- Comitter:
- poomyuttt
- Date:
- Tue Jun 02 09:47:12 2015 +0000
- Parent:
- 3:19accdf325fe
- Commit message:
- project
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 19accdf325fe -r 33cfa6f20f2f main.cpp --- a/main.cpp Tue May 26 18:00:45 2015 +0000 +++ b/main.cpp Tue Jun 02 09:47:12 2015 +0000 @@ -152,18 +152,20 @@ timeout=2000;getcount=600; SendCMD(); getreply(); - pc.printf(replybuff); + //lcd.printf(replybuff); pc.printf("%d",count); if (strstr(replybuff, "OK") != NULL) { strcpy(cmdbuff, "AT+CWMODE=1\r\n"); // set wifi to station - timeout=500;getcount=10; - SendCMD(); - getreply(); - strcpy(cmdbuff, "AT+CWJAP=""FSE-Wireless"",""1234567890""\r\n"); // set wifi to station timeout=500;getcount=50; SendCMD(); getreply(); - lcd.printf("\n++++++++++ Starting Server ++++++++++\r\n"); + //lcd.printf(replybuff); + strcpy(cmdbuff, "AT+CWJAP=""Fookies-One(m8)"",""12312344""\r\n"); // set wifi to station + timeout=500;getcount=50; + SendCMD(); + getreply(); + //lcd.printf(replybuff); + //lcd.printf("\n++++++++++ Starting Server ++++++++++\r\n"); strcpy(cmdbuff, "AT+CIPMUX=1\r\n"); // set multiple connections. timeout=500;getcount=10; SendCMD(); @@ -176,11 +178,12 @@ //timeout=500;getcount=50; //SendCMD(); //getreply(); - lcd.printf("\n Getting Server IP \r\n"); + lcd.printf("Getting IP"); strcpy(cmdbuff, "AT+CIFSR\r\n"); timeout=1000;getcount=50; while(weberror==0){ SendCMD();getreply(); + lcd.printf(replybuff); if (strstr(replybuff, "0.0.0.0") == NULL) {weberror=1;} // wait for valid IP } lcd.printf("\n Enter WEB address in your browser \r\n\n");