Created
May 11, 2020 13:24
-
-
Save noob-master147/4346f47d4ce8ca845243d37379ba9c1e to your computer and use it in GitHub Desktop.
ESP8266 OTA
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> // Include the Wi-Fi libraryconst | |
char* ssid = "SSID"; // The SSID (name) of network to connect | |
char* password = "PASSWORD"; // The password of the Wi-Fi | |
void setup() { | |
Serial.begin(115200); // Start the Serial communication | |
WiFi.begin(ssid, password); // Connect to the network | |
Serial.print("Connecting "); | |
while (WiFi.status() != WL_CONNECTED) | |
{ // Wait for the Wi-Fi to connect | |
delay(1000); | |
Serial.print('.'); | |
} | |
Serial.println('\n'); | |
Serial.println("Connection established!"); | |
Serial.print("IP address:\t"); | |
Serial.println(WiFi.localIP()); | |
// Send the IP address of the ESP8266 to the computer | |
} | |
void loop() { | |
// Type Your Code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment