#include "WiFi.h"
const char* ssid = "NombreRed";
const char* password = "contrasenaRed";
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to
WiFi..");
}
Serial.println();
Serial.print("Conectado
a:\t");
Serial.println(WiFi.SSID());
Serial.print("IP
address:\t");
Serial.println(WiFi.localIP());
}
void loop() {
Serial.print("Conectado
a:\t");
Serial.println(WiFi.SSID());
Serial.print("IP
address:\t");
Serial.println(WiFi.localIP());
delay(5000);
}