esp8266 wifi example
client.println("<style>html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}");
esp8266 wifi example
client.println("<style>html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}");
esp8266 example
/*
* This sketch shows the WiFi event usage
*
* In this example you can receive and process below events.
* Refer to ESP8266WiFiType.h
*
typedef enum {
WIFI_EVENT_STAMODE_CONNECTED = 0,
WIFI_EVENT_STAMODE_DISCONNECTED,
WIFI_EVENT_STAMODE_AUTHMODE_CHANGE,
WIFI_EVENT_STAMODE_GOT_IP,
WIFI_EVENT_STAMODE_DHCP_TIMEOUT,
WIFI_EVENT_SOFTAPMODE_STACONNECTED,
WIFI_EVENT_SOFTAPMODE_STADISCONNECTED,
WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED,
WIFI_EVENT_MAX
} WiFiEvent_t;
*
* hardcopyworld.com
*/
#include <ESP8266WiFi.h>
const char *ssid = "201-1203-office-net";
const char *password = "my_office_pwd";
void WiFiEvent(WiFiEvent_t event)
{
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event)
{
case WIFI_EVENT_STAMODE_GOT_IP:
Serial.println("WiFi connected");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
break;
case WIFI_EVENT_STAMODE_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
}
}
void setup()
{
Serial.begin(115200);
//Serial.begin(9600);
// delete old config
WiFi.disconnect(true);
delay(1000);
WiFi.onEvent(WiFiEvent);
WiFi.begin(ssid, password);
Serial.println();
Serial.println();
Serial.println("Wait for WiFi... ");
}
void loop()
{
delay(1000);
}
esp8266 example
#include <ESP8266WiFi.h> // Include the Wi-Fi library
const char *ssid = "ESP8266 Access Point"; // The name of the Wi-Fi network that will be created
const char *password = "thereisnospoon"; // The password required to connect to it, leave blank for an open network
void setup() {
Serial.begin(115200);
delay(10);
Serial.println('\n');
WiFi.softAP(ssid, password); // Start the access point
Serial.print("Access Point \"");
Serial.print(ssid);
Serial.println("\" started");
Serial.print("IP address:\t");
Serial.println(WiFi.softAPIP()); // Send the IP address of the ESP8266 to the computer
}
void loop() { }
esp8266 wifi example
WiFiClient client = server.available(); // Listen for incoming clients
esp8266 wifi example
const char* ssid = "";
const char* password = "";
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us