     Serial.print("[WIFI] Connecting to ");
     Serial.println(WIFI_SSID);
 
-    delay(10);
+    //wifi_set_phy_mode(PHY_MODE_11N);
     WiFi.mode(WIFI_STA);
     WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
     WiFi.hostname("esp-bedroomlight");

    if (bRelayReady)
    {
      change_light();
      lastRelayActionmillis = millis();
      bUpdated = false;
    }

#include <Ticker.h>
#include "/usr/local/src/rpi2_setting.h"

extern "C" {
#include "user_interface.h"
}

#define BUTTON_PIN 0
#define RELAY_PIN 12
#define LED_PIN 13

#define BETWEEN_RELAY_ACTIVE 1000

IPAddress mqtt_server = MQTT_SERVER;

const char* subscribe_topic = "light/bedroomlight";
const char* reporting_topic = "light/bedroomlight/report";

long lastReconnectAttempt = 0;
volatile bool bUpdated = false;
volatile bool bRelayState = false;
