Code:
#include <WiFi.h>
void setup(){
WiFi.begin("SSID", "PASSWORD");
// SSID and password is the router you want to connect
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.begin(9600);
}
void loop(){
Serial.println("Local IP:");
Serial.println(WiFi.localIP());
delay(1000);
}