wifi.ino 298 Bytes
#include "wifi.h"

void setup_wifi() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    /* Serial.println("delay"); */
    delay(500);
  }
  if (MDNS.begin(host)) {
    /* Serial.println("MDNS responder started"); */
  }
}