Skip to content

Instantly share code, notes, and snippets.

@jagannath-sahoo
Created April 16, 2019 02:42
Show Gist options
  • Save jagannath-sahoo/344ac224a6392391f2355bbaec7d0613 to your computer and use it in GitHub Desktop.
Save jagannath-sahoo/344ac224a6392391f2355bbaec7d0613 to your computer and use it in GitHub Desktop.
Get Verify whether your ESP32 is connected or not
#include <WiFi.h>
const char* ssid = "ACTS-AP2";
const char* password = "";
void setup() {
Serial.begin(115200);
delay(4000);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi.");
}
Serial.println("Connected to the WiFi network");
}
void loop() {
if ((WiFi.status() == WL_CONNECTED)) { //Check the current connection status
Serial.println("Connected");
}
Serial.println(WiFi.localIP());
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment