diff --git a/examples/Simple/Simple.ino b/examples/Simple/Simple.ino index 5875927..489fad5 100644 --- a/examples/Simple/Simple.ino +++ b/examples/Simple/Simple.ino @@ -17,12 +17,6 @@ #include #include -#if defined(ARDUINO_ARCH_ESP8266) -ESP8266WebServer Server; -#elif defined(ARDUINO_ARCH_ESP32) -WebServer Server; -#endif - static const char AUX_TIMEZONE[] PROGMEM = R"( { "title": "TimeZone", @@ -89,6 +83,12 @@ static const Timezone_t TZ[] = { { "Pacific/Samoa", "oceania.pool.ntp.org", -11 } }; +#if defined(ARDUINO_ARCH_ESP8266) +ESP8266WebServer Server; +#elif defined(ARDUINO_ARCH_ESP32) +WebServer Server; +#endif + AutoConnect Portal(Server); AutoConnectConfig Config; // Enable autoReconnect supported on v0.9.4 AutoConnectAux Timezone; @@ -178,4 +178,3 @@ void setup() { void loop() { Portal.handleClient(); } -