Last active
September 3, 2015 19:38
-
-
Save chaeplin/190ba7175d1e8098a629 to your computer and use it in GitHub Desktop.
esp8266_wifi_test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
//#include <IPAddress.h> | |
const char* ssid = "wifi_ssid"; | |
const char* password = "wifi_password"; | |
WiFiClient wifiClient; | |
long startMills; | |
void setup() { | |
delay(50); | |
startMills = millis(); | |
Serial.begin(38400); | |
Serial.println(millis() - startMills); | |
Serial.println(); | |
Serial.println(); | |
Serial.print("Connecting to "); | |
Serial.println(ssid); | |
WiFi.mode(WIFI_STA); | |
Serial.println(millis() - startMills); | |
WiFi.begin(ssid, password); | |
WiFi.config(IPAddress(192, 168, 10, 15), IPAddress(192, 168, 10, 1), IPAddress(255, 255, 255, 0)); | |
Serial.println(millis() - startMills); | |
while (WiFi.status() != WL_CONNECTED) { | |
Serial.print("."); | |
delay(100); | |
} | |
Serial.println(""); | |
Serial.println(millis() - startMills); | |
Serial.println("WiFi connected"); | |
Serial.println("IP address: "); | |
Serial.println(WiFi.localIP()); | |
Serial.println("done"); | |
} | |
void loop() { | |
delay(200); | |
Serial.println("going to sleep"); | |
ESP.deepSleep(5000000, WAKE_RF_DEFAULT); | |
} |
include <ESP8266WiFi.h>
extern "C"{
include "user_interface.h"
}
WiFi.begin(ssid, password);
wifi_set_channel(7);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tail 0
chksum 0xb3
load 0x3ffe8000, len 1548, room 8
tail �b��d䄆����������ć䦆FC�����������Ʀ��DŽ�b�ƄbŧĄ�EÇ�ĥ�������Ć���D�ƄbŧĄ�DÇ�ĥ����������DŽD�ƄE�慆Ĥb�Ą�E�b1
Connecting to wifi_ssid
1
1
............
2018
WiFi connected
IP address:
192.168.10.15
done
going to sleep
b��d䄆����������ć䦦FC�����������Ʀ��DŽ�b�ƄbŧĄ�EÇ�ĥ�������Ć���D�ƄbŧĄ�DÇ�ĥ����������DŽD�ƄE�慆Ĥb�Ą�E��b1
Connecting to wifi_ssid
1
4
...
1109
WiFi connected
IP address:
192.168.10.15
done
going to sleep
b��d䄆����������ć䦦FC�����������Ʀ��DŽ�b�ƄbŧĄ�EÇ�ĥ�������Ć���D�ƄbŧĄ�DÇ�ĥ����������DŽD�ƄE�慆Ĥb�Ą�E��b1
Connecting to wifi_ssid
1
3
...
1109
WiFi connected
IP address:
192.168.10.15
done
going to sleep
b��d䄆����������ć䦦FC�����������Ʀ��DŽ�b�ƄbŧĄ�EÇ�ĥ�������Ć���D�ƄbŧĄ�DÇ�ĥ����������DŽD�ƄE�慆Ĥb�Ą�E��b1
Connecting to wifi_ssid
1
4
...
1109
WiFi connected
IP address:
192.168.10.15
done
going to sleep