Created
April 18, 2021 17:21
-
-
Save shahriarshafin/61fc4a2e7a127172327512919800667f to your computer and use it in GitHub Desktop.
This file contains 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
// open Serial Monitor and Set baud rate 115200 | |
#include <ESP8266WiFi.h> | |
WiFiClient client; | |
WiFiServer server(80); | |
const char* ssid = "Network Unavailable"; | |
const char* password = "dontshare"; | |
void setup() | |
{ | |
Serial.begin(115200); | |
connectWiFi(); | |
server.begin(); | |
} | |
void loop() | |
{ | |
} | |
void connectWiFi() | |
{ | |
Serial.println("Connecting to WIFI"); | |
WiFi.begin(ssid, password); | |
while ((!(WiFi.status() == WL_CONNECTED))) | |
{ | |
delay(300); | |
Serial.print(".."); | |
} | |
Serial.println(""); | |
Serial.println("WiFi connected"); | |
Serial.println("NodeMCU Local IP is : "); | |
Serial.print((WiFi.localIP())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment