pengfei wu
/
ESP8266Program
For test
Diff: main.cpp
- Revision:
- 33:f721a46ef2f2
- Parent:
- 30:46a560b71e61
- Child:
- 34:65cd9c6eedb8
--- a/main.cpp Wed Feb 04 15:40:07 2015 +0000 +++ b/main.cpp Thu Feb 05 02:28:09 2015 +0000 @@ -32,13 +32,20 @@ void setup() { printf("setup begin\r\n"); - wifi.reset(); - if(!wifi.setStationMode(SSID, PASSWORD)) { - printf("init error\r\n"); + if(wifi.reset()) { + printf("reset ok\r\n"); + } else { + printf("reset err\r\n"); } - delay(8000); - printf("IP address:%s\r\n", wifi.showIP().c_str()); - printf("Access Point:%s\r\n", wifi.showJAP().c_str()); + + if(wifi.setStationMode(SSID, PASSWORD)) { + printf("setStationMode ok\r\n"); + } else { + printf("setStationMode err\r\n"); + } + + printf("IP:%s\r\n", wifi.showIP().c_str()); + printf("AP:%s\r\n", wifi.showJAP().c_str()); printf("setup end\r\n"); }