Last active
July 2, 2018 12:01
-
-
Save li2hub/5a26b076a50d7e1009989379328b05f3 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
#include <ESP8266WiFi.h> | |
const char* ssid = "YOUR NETWORK SSID"; | |
const char* password = "PASSWORD"; | |
int wifiStatus; | |
void setup() { | |
Serial.begin(9600); | |
delay(200); | |
Serial.println(); | |
Serial.println(); | |
Serial.print("Your are connecting to;"); | |
Serial.println(ssid); | |
WiFi.begin(ssid, password); | |
delay(2000); | |
} | |
void loop() { | |
wifiStatus = WiFi.status(); | |
if(wifiStatus == WL_CONNECTED){ | |
Serial.println(""); | |
Serial.println("Your WiFi is connected!"); | |
Serial.println("Your IP address is: "); | |
Serial.println(WiFi.localIP()); | |
} | |
else{ | |
Serial.println("WiFi not connected"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment