Created
April 16, 2019 02:42
-
-
Save jagannath-sahoo/344ac224a6392391f2355bbaec7d0613 to your computer and use it in GitHub Desktop.
Get Verify whether your ESP32 is connected or not
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 <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