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.
Dependencies: DS3231 RHT03 TextLCD mbed
Fork of HomeStatus by
Diff: main.cpp
- Revision:
- 4:33cfa6f20f2f
- Parent:
- 3:19accdf325fe
--- 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");
