Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 366 Bytes

README.md

File metadata and controls

9 lines (5 loc) · 366 Bytes

Wi-Fi

This code shows how to connect to Wi-Fi network. You usually use it in setup() method when you need network connectivity for your project.

#include <WiFi.h>
const char WIFI_SSID[] = "YOUR_SSID"; // TODO change
const char WIFI_PASSWORD[] = "YOUR_PASSWORD"; // TODO change
void setup() {
Serial.begin(9600);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
Serial.println("Failed to connect");
delay(1000);
}
}
void loop() {
Serial.println("Connected");
delay(1000);
}

Sources