Code: Select all
const char* host = "example";
void setupWifi()
{
WiFi.mode(WIFI_AP);
WiFi.softAP("SSID","Password");
Serial.println(WiFi.softAPIP());
}
setupWifi();
MDNS.begin(host);
if (!MDNS.begin(host)) {
Serial.println("Error startng mDNS responder");
}
else {
Serial.println("mDNS server started");
}