#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <Adafruit_NeoPixel.h>
+#include <TimeLib.h>
+
+#include <DNSServer.h>
+#include <ESP8266WebServer.h>
+#include <WiFiManager.h>
+
+#include <EEPROM.h>
#define LED_PIN D6
unsigned int Second1 = 0;
unsigned int Second2 = 0;
+int utc=0;
+bool displaySwitch=true;
+unsigned int pause = 0;
+unsigned long timeout;
+//unsigned long newNTPreq;
+unsigned long secondTick;
+bool dst = false;
+int minTmp;
+
+
+const char *ssid = "";
+const char *password = "";
+
+long utcOffsetInSeconds = 3600*utc;
+
+// /header.html
+const char data_header_html[] PROGMEM = {0X3C,0X68,0X74,0X6D,0X6C,0X3E,0X3C,0X68,0X65,0X61,0X64,0X3E,0X3C,0X6D,0X65,0X74,0X61,0X20,0X6E,0X61,0X6D,0X65,0X3D,0X76,0X69,0X65,0X77,0X70,0X6F,0X72,0X74,0X20,0X63,0X6F,0X6E,0X74,0X65,0X6E,0X74,0X3D,0X22,0X77,0X69,0X64,0X74,0X68,0X3D,0X64,0X65,0X76,0X69,0X63,0X65,0X2D,0X77,0X69,0X64,0X74,0X68,0X2C,0X69,0X6E,0X69,0X74,0X69,0X61,0X6C,0X2D,0X73,0X63,0X61,0X6C,0X65,0X3D,0X31,0X22,0X3E,0X3C,0X6D,0X65,0X74,0X61,0X20,0X63,0X68,0X61,0X72,0X73,0X65,0X74,0X3D,0X75,0X74,0X66,0X2D,0X38,0X3E,0X3C,0X73,0X74,0X79,0X6C,0X65,0X3E,0X62,0X6F,0X64,0X79,0X7B,0X66,0X6F,0X6E,0X74,0X2D,0X73,0X69,0X7A,0X65,0X3A,0X31,0X34,0X30,0X25,0X7D,0X23,0X6D,0X61,0X69,0X6E,0X7B,0X64,0X69,0X73,0X70,0X6C,0X61,0X79,0X3A,0X74,0X61,0X62,0X6C,0X65,0X3B,0X6D,0X61,0X72,0X67,0X69,0X6E,0X3A,0X61,0X75,0X74,0X6F,0X3B,0X70,0X61,0X64,0X64,0X69,0X6E,0X67,0X3A,0X30,0X20,0X31,0X30,0X70,0X78,0X20,0X30,0X20,0X31,0X30,0X70,0X78,0X7D,0X2C,0X68,0X32,0X7B,0X74,0X65,0X78,0X74,0X2D,0X61,0X6C,0X69,0X67,0X6E,0X3A,0X63,0X65,0X6E,0X74,0X65,0X72,0X7D,0X2E,0X62,0X75,0X74,0X74,0X6F,0X6E,0X7B,0X70,0X61,0X64,0X64,0X69,0X6E,0X67,0X3A,0X31,0X30,0X70,0X78,0X20,0X31,0X30,0X70,0X78,0X20,0X31,0X30,0X70,0X78,0X20,0X31,0X30,0X70,0X78,0X3B,0X77,0X69,0X64,0X74,0X68,0X3A,0X31,0X30,0X30,0X25,0X3B,0X62,0X61,0X63,0X6B,0X67,0X72,0X6F,0X75,0X6E,0X64,0X2D,0X63,0X6F,0X6C,0X6F,0X72,0X3A,0X23,0X34,0X43,0X41,0X46,0X35,0X30,0X3B,0X66,0X6F,0X6E,0X74,0X2D,0X73,0X69,0X7A,0X65,0X3A,0X31,0X32,0X30,0X25,0X7D,0X3C,0X2F,0X73,0X74,0X79,0X6C,0X65,0X3E,0X3C,0X74,0X69,0X74,0X6C,0X65,0X3E,0X56,0X46,0X44,0X20,0X43,0X6c,0X6f,0X63,0X6b,0X20,0X43,0X6f,0X6e,0X74,0X72,0X6f,0X6c,0X3C,0X2F,0X74,0X69,0X74,0X6C,0X65,0X3E,0X3C,0X2F,0X68,0X65,0X61,0X64,0X3E,0X3C,0X62,0X6F,0X64,0X79,0X3E,0X3C,0X64,0X69,0X76,0X20,0X69,0X64,0X3D,0X6D,0X61,0X69,0X6E,0X3E,0X3C,0X68,0X32,0x20,0x61,0x6c,0x69,0x67,0x6e,0x3d,0x22,0x63,0x65,0x6e,0x74,0x65,0x72,0x22,0X3E,0X56,0X46,0X44,0X20,0X43,0X6c,0X6f,0X63,0X6b,0X20,0X43,0X6f,0X6e,0X74,0X72,0X6f,0X6c,0X3C,0X2F,0X68,0X32,0X3E,0XA,0X3C,0X62,0X72,0X3E,0XA,0X3C,0X63,0X65,0X6E,0X74,0X65,0X72,0X3E,0X0A,0X00};
+
+// /footer.html
+const char data_footer_html[] PROGMEM = {0x3c,0x2f,0x63,0x65,0x6e,0x74,0x65,0x72,0x3e,0X3c,0X2f,0X62,0X6f,0X64,0X79,0X3e,0X0a,0X3c,0X2f,0X68,0X74,0X6d,0X6c,0X3e,0X0a,0x00};
-const char *ssid = "SSID";
-const char *password = "PASSWORD";
+// /body.html
+const char data_body_html[] PROGMEM = {0X3C,0X66,0X6F,0X72,0X6D,0X20,0X61,0X63,0X74,0X69,0X6F,0X6E,0X3D,0X2F,0X20,0X6D,0X65,0X74,0X68,0X6F,0X64,0X3D,0X50,0X4F,0X53,0X54,0X3E,0XA,0X53,0X65,0X6C,0X65,0X63,0X74,0X20,0X79,0X6F,0X75,0X72,0X20,0X74,0X69,0X6D,0X65,0X7A,0X6F,0X6E,0X65,0X3A,0XA,0X3C,0X73,0X65,0X6C,0X65,0X63,0X74,0X20,0X6E,0X61,0X6D,0X65,0X3D,0X75,0X74,0X63,0X20,0X69,0X64,0X3D,0X75,0X74,0X63,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X31,0X32,0X3A,0X30,0X30,0X29,0X20,0X49,0X6E,0X74,0X65,0X72,0X6E,0X61,0X74,0X69,0X6F,0X6E,0X61,0X6C,0X20,0X44,0X61,0X74,0X65,0X20,0X4C,0X69,0X6E,0X65,0X20,0X57,0X65,0X73,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X31,0X31,0X3A,0X30,0X30,0X29,0X20,0X4D,0X69,0X64,0X77,0X61,0X79,0X20,0X49,0X73,0X6C,0X61,0X6E,0X64,0X2C,0X20,0X53,0X61,0X6D,0X6F,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X48,0X61,0X77,0X61,0X69,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X41,0X6C,0X61,0X73,0X6B,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X50,0X61,0X63,0X69,0X66,0X69,0X63,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X54,0X69,0X6A,0X75,0X61,0X6E,0X61,0X2C,0X20,0X42,0X61,0X6A,0X61,0X20,0X43,0X61,0X6C,0X69,0X66,0X6F,0X72,0X6E,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X41,0X72,0X69,0X7A,0X6F,0X6E,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X43,0X68,0X69,0X68,0X75,0X61,0X68,0X75,0X61,0X2C,0X20,0X4C,0X61,0X20,0X50,0X61,0X7A,0X2C,0X20,0X4D,0X61,0X7A,0X61,0X74,0X6C,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X4D,0X6F,0X75,0X6E,0X74,0X61,0X69,0X6E,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X43,0X65,0X6E,0X74,0X72,0X61,0X6C,0X20,0X41,0X6D,0X65,0X72,0X69,0X63,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X43,0X65,0X6E,0X74,0X72,0X61,0X6C,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X47,0X75,0X61,0X64,0X61,0X6C,0X61,0X6A,0X61,0X72,0X61,0X2C,0X20,0X4D,0X65,0X78,0X69,0X63,0X6F,0X20,0X43,0X69,0X74,0X79,0X2C,0X20,0X4D,0X6F,0X6E,0X74,0X65,0X72,0X72,0X65,0X79,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X53,0X61,0X73,0X6B,0X61,0X74,0X63,0X68,0X65,0X77,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X42,0X6F,0X67,0X6F,0X74,0X61,0X2C,0X20,0X4C,0X69,0X6D,0X61,0X2C,0X20,0X51,0X75,0X69,0X74,0X6F,0X2C,0X20,0X52,0X69,0X6F,0X20,0X42,0X72,0X61,0X6E,0X63,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X45,0X61,0X73,0X74,0X65,0X72,0X6E,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X49,0X6E,0X64,0X69,0X61,0X6E,0X61,0X20,0X28,0X45,0X61,0X73,0X74,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X41,0X74,0X6C,0X61,0X6E,0X74,0X69,0X63,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X72,0X61,0X63,0X61,0X73,0X2C,0X20,0X4C,0X61,0X20,0X50,0X61,0X7A,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X4D,0X61,0X6E,0X61,0X75,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X53,0X61,0X6E,0X74,0X69,0X61,0X67,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X33,0X30,0X29,0X20,0X4E,0X65,0X77,0X66,0X6F,0X75,0X6E,0X64,0X6C,0X61,0X6E,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X42,0X72,0X61,0X73,0X69,0X6C,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X42,0X75,0X65,0X6E,0X6F,0X73,0X20,0X41,0X69,0X72,0X65,0X73,0X2C,0X20,0X47,0X65,0X6F,0X72,0X67,0X65,0X74,0X6F,0X77,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X47,0X72,0X65,0X65,0X6E,0X6C,0X61,0X6E,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4D,0X6F,0X6E,0X74,0X65,0X76,0X69,0X64,0X65,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X4D,0X69,0X64,0X2D,0X41,0X74,0X6C,0X61,0X6E,0X74,0X69,0X63,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X70,0X65,0X20,0X56,0X65,0X72,0X64,0X65,0X20,0X49,0X73,0X2E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X41,0X7A,0X6F,0X72,0X65,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X30,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X73,0X61,0X62,0X6C,0X61,0X6E,0X63,0X61,0X2C,0X20,0X4D,0X6F,0X6E,0X72,0X6F,0X76,0X69,0X61,0X2C,0X20,0X52,0X65,0X79,0X6B,0X6A,0X61,0X76,0X69,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X30,0X3A,0X30,0X30,0X29,0X20,0X47,0X72,0X65,0X65,0X6E,0X77,0X69,0X63,0X68,0X20,0X4D,0X65,0X61,0X6E,0X20,0X54,0X69,0X6D,0X65,0X20,0X3A,0X20,0X44,0X75,0X62,0X6C,0X69,0X6E,0X2C,0X20,0X45,0X64,0X69,0X6E,0X62,0X75,0X72,0X67,0X68,0X2C,0X20,0X4C,0X69,0X73,0X62,0X6F,0X6E,0X2C,0X20,0X4C,0X6F,0X6E,0X64,0X6F,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X41,0X6D,0X73,0X74,0X65,0X72,0X64,0X61,0X6D,0X2C,0X20,0X42,0X65,0X72,0X6C,0X69,0X6E,0X2C,0X20,0X42,0X65,0X72,0X6E,0X2C,0X20,0X52,0X6F,0X6D,0X65,0X2C,0X20,0X53,0X74,0X6F,0X63,0X6B,0X68,0X6F,0X6C,0X6D,0X2C,0X20,0X56,0X69,0X65,0X6E,0X6E,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X42,0X65,0X6C,0X67,0X72,0X61,0X64,0X65,0X2C,0X20,0X42,0X72,0X61,0X74,0X69,0X73,0X6C,0X61,0X76,0X61,0X2C,0X20,0X42,0X75,0X64,0X61,0X70,0X65,0X73,0X74,0X2C,0X20,0X4C,0X6A,0X75,0X62,0X6C,0X6A,0X61,0X6E,0X61,0X2C,0X20,0X50,0X72,0X61,0X67,0X75,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X42,0X72,0X75,0X73,0X73,0X65,0X6C,0X73,0X2C,0X20,0X43,0X6F,0X70,0X65,0X6E,0X68,0X61,0X67,0X65,0X6E,0X2C,0X20,0X4D,0X61,0X64,0X72,0X69,0X64,0X2C,0X20,0X50,0X61,0X72,0X69,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X53,0X61,0X72,0X61,0X6A,0X65,0X76,0X6F,0X2C,0X20,0X53,0X6B,0X6F,0X70,0X6A,0X65,0X2C,0X20,0X57,0X61,0X72,0X73,0X61,0X77,0X2C,0X20,0X5A,0X61,0X67,0X72,0X65,0X62,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X57,0X65,0X73,0X74,0X20,0X43,0X65,0X6E,0X74,0X72,0X61,0X6C,0X20,0X41,0X66,0X72,0X69,0X63,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X41,0X6D,0X6D,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X41,0X74,0X68,0X65,0X6E,0X73,0X2C,0X20,0X42,0X75,0X63,0X68,0X61,0X72,0X65,0X73,0X74,0X2C,0X20,0X49,0X73,0X74,0X61,0X6E,0X62,0X75,0X6C,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X42,0X65,0X69,0X72,0X75,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X69,0X72,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X48,0X61,0X72,0X61,0X72,0X65,0X2C,0X20,0X50,0X72,0X65,0X74,0X6F,0X72,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X48,0X65,0X6C,0X73,0X69,0X6E,0X6B,0X69,0X2C,0X20,0X4B,0X79,0X69,0X76,0X2C,0X20,0X52,0X69,0X67,0X61,0X2C,0X20,0X53,0X6F,0X66,0X69,0X61,0X2C,0X20,0X54,0X61,0X6C,0X6C,0X69,0X6E,0X6E,0X2C,0X20,0X56,0X69,0X6C,0X6E,0X69,0X75,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X4A,0X65,0X72,0X75,0X73,0X61,0X6C,0X65,0X6D,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X4D,0X69,0X6E,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X57,0X69,0X6E,0X64,0X68,0X6F,0X65,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4B,0X75,0X77,0X61,0X69,0X74,0X2C,0X20,0X52,0X69,0X79,0X61,0X64,0X68,0X2C,0X20,0X42,0X61,0X67,0X68,0X64,0X61,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4D,0X6F,0X73,0X63,0X6F,0X77,0X2C,0X20,0X53,0X74,0X2E,0X20,0X50,0X65,0X74,0X65,0X72,0X73,0X62,0X75,0X72,0X67,0X2C,0X20,0X56,0X6F,0X6C,0X67,0X6F,0X67,0X72,0X61,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4E,0X61,0X69,0X72,0X6F,0X62,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X54,0X62,0X69,0X6C,0X69,0X73,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X33,0X30,0X29,0X20,0X54,0X65,0X68,0X72,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X41,0X62,0X75,0X20,0X44,0X68,0X61,0X62,0X69,0X2C,0X20,0X4D,0X75,0X73,0X63,0X61,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X42,0X61,0X6B,0X75,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X59,0X65,0X72,0X65,0X76,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X33,0X30,0X29,0X20,0X4B,0X61,0X62,0X75,0X6C,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X59,0X65,0X6B,0X61,0X74,0X65,0X72,0X69,0X6E,0X62,0X75,0X72,0X67,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X49,0X73,0X6C,0X61,0X6D,0X61,0X62,0X61,0X64,0X2C,0X20,0X4B,0X61,0X72,0X61,0X63,0X68,0X69,0X2C,0X20,0X54,0X61,0X73,0X68,0X6B,0X65,0X6E,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X33,0X30,0X29,0X20,0X53,0X72,0X69,0X20,0X4A,0X61,0X79,0X61,0X77,0X61,0X72,0X64,0X65,0X6E,0X61,0X70,0X75,0X72,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X33,0X30,0X29,0X20,0X43,0X68,0X65,0X6E,0X6E,0X61,0X69,0X2C,0X20,0X4B,0X6F,0X6C,0X6B,0X61,0X74,0X61,0X2C,0X20,0X4D,0X75,0X6D,0X62,0X61,0X69,0X2C,0X20,0X4E,0X65,0X77,0X20,0X44,0X65,0X6C,0X68,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X2E,0X37,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X34,0X35,0X29,0X20,0X4B,0X61,0X74,0X68,0X6D,0X61,0X6E,0X64,0X75,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X41,0X6C,0X6D,0X61,0X74,0X79,0X2C,0X20,0X4E,0X6F,0X76,0X6F,0X73,0X69,0X62,0X69,0X72,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X41,0X73,0X74,0X61,0X6E,0X61,0X2C,0X20,0X44,0X68,0X61,0X6B,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X36,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X36,0X3A,0X33,0X30,0X29,0X20,0X59,0X61,0X6E,0X67,0X6F,0X6E,0X20,0X28,0X52,0X61,0X6E,0X67,0X6F,0X6F,0X6E,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X42,0X61,0X6E,0X67,0X6B,0X6F,0X6B,0X2C,0X20,0X48,0X61,0X6E,0X6F,0X69,0X2C,0X20,0X4A,0X61,0X6B,0X61,0X72,0X74,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X4B,0X72,0X61,0X73,0X6E,0X6F,0X79,0X61,0X72,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X42,0X65,0X69,0X6A,0X69,0X6E,0X67,0X2C,0X20,0X43,0X68,0X6F,0X6E,0X67,0X71,0X69,0X6E,0X67,0X2C,0X20,0X48,0X6F,0X6E,0X67,0X20,0X4B,0X6F,0X6E,0X67,0X2C,0X20,0X55,0X72,0X75,0X6D,0X71,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X4B,0X75,0X61,0X6C,0X61,0X20,0X4C,0X75,0X6D,0X70,0X75,0X72,0X2C,0X20,0X53,0X69,0X6E,0X67,0X61,0X70,0X6F,0X72,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X49,0X72,0X6B,0X75,0X74,0X73,0X6B,0X2C,0X20,0X55,0X6C,0X61,0X61,0X6E,0X20,0X42,0X61,0X74,0X61,0X61,0X72,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X50,0X65,0X72,0X74,0X68,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X54,0X61,0X69,0X70,0X65,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X4F,0X73,0X61,0X6B,0X61,0X2C,0X20,0X53,0X61,0X70,0X70,0X6F,0X72,0X6F,0X2C,0X20,0X54,0X6F,0X6B,0X79,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X53,0X65,0X6F,0X75,0X6C,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X59,0X61,0X6B,0X75,0X74,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X33,0X30,0X29,0X20,0X41,0X64,0X65,0X6C,0X61,0X69,0X64,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X33,0X30,0X29,0X20,0X44,0X61,0X72,0X77,0X69,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X42,0X72,0X69,0X73,0X62,0X61,0X6E,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X6E,0X62,0X65,0X72,0X72,0X61,0X2C,0X20,0X4D,0X65,0X6C,0X62,0X6F,0X75,0X72,0X6E,0X65,0X2C,0X20,0X53,0X79,0X64,0X6E,0X65,0X79,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X48,0X6F,0X62,0X61,0X72,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X47,0X75,0X61,0X6D,0X2C,0X20,0X50,0X6F,0X72,0X74,0X20,0X4D,0X6F,0X72,0X65,0X73,0X62,0X79,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X56,0X6C,0X61,0X64,0X69,0X76,0X6F,0X73,0X74,0X6F,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X31,0X3A,0X30,0X30,0X29,0X20,0X4D,0X61,0X67,0X61,0X64,0X61,0X6E,0X2C,0X20,0X53,0X6F,0X6C,0X6F,0X6D,0X6F,0X6E,0X20,0X49,0X73,0X2E,0X2C,0X20,0X4E,0X65,0X77,0X20,0X43,0X61,0X6C,0X65,0X64,0X6F,0X6E,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X32,0X3A,0X30,0X30,0X29,0X20,0X41,0X75,0X63,0X6B,0X6C,0X61,0X6E,0X64,0X2C,0X20,0X57,0X65,0X6C,0X6C,0X69,0X6E,0X67,0X74,0X6F,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X32,0X3A,0X30,0X30,0X29,0X20,0X46,0X69,0X6A,0X69,0X2C,0X20,0X4B,0X61,0X6D,0X63,0X68,0X61,0X74,0X6B,0X61,0X2C,0X20,0X4D,0X61,0X72,0X73,0X68,0X61,0X6C,0X6C,0X20,0X49,0X73,0X2E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X33,0X3A,0X30,0X30,0X29,0X20,0X4E,0X75,0X6B,0X75,0X27,0X61,0X6C,0X6F,0X66,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X2F,0X73,0X65,0X6C,0X65,0X63,0X74,0X3E,0XA,0X3C,0X62,0X72,0X3E,0X3C,0X69,0X6E,0X70,0X75,0X74,0X20,0X74,0X79,0X70,0X65,0X3D,0X73,0X75,0X62,0X6D,0X69,0X74,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X53,0X75,0X62,0X6D,0X69,0X74,0X3E,0XA,0X3C,0X2F,0X66,0X6F,0X72,0X6D,0X3E,0XA,0x00};
-const long utcOffsetInSeconds = 3600*-5;
+WiFiManager wifiManager;
+WiFiServer server(80);
WiFiUDP ntpUDP;
-NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds);
-Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
+NTPClient timeClient(ntpUDP, "pool.ntp.org");
-//arduino
-//const int dataPin = 13; //Outputs the byte to transfer
-//const int loadPin = 11; //3 //Controls the internal transference of data in SN74HC595 internal registers
-//const int clockPin = 12; // 4//Generates the clock signal to control the transference of data
+Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
-//nodeMCU
-//const int dataPin = 14; //Outputs the byte to transfer
-//const int loadPin = 0; //3 //Controls the internal transference of data in SN74HC595 internal registers
-//const int clockPin = 4; // 4//Generates the clock signal to control the transference of data
+String header = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n";
+String request = "";
//wemos
const int dataPin = 14; //D5 //Outputs the byte to transfer
void setup() {
Serial.begin(115200);
+ EEPROM.begin(512);
+ //utc = int(EEPROM.read(0));
+ EEPROM.get(0,utc);
+ EEPROM.end();
pinMode(dataPin, OUTPUT);
pinMode(loadPin, OUTPUT);
shiftOut(dataPin, clockPin, LSBFIRST, 0b00000000);
digitalWrite(loadPin, 1);
- WiFi.begin(ssid, password);
- int i=0;
- int b=0;
- while ( WiFi.status() != WL_CONNECTED ) {
- delay ( 500 );
- digitalWrite(loadPin, 0);
- shiftOut(dataPin, clockPin, LSBFIRST, digits[i]); //right
- shiftOut(dataPin, clockPin, LSBFIRST, digits[b]); //left
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00000000);
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00000000);
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00000000);
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00000000);
- digitalWrite(loadPin, 1);
- i++;
- if (i==10) {
- i=0;
- b++;
- }
- if (b==9 && i==9) {
- digitalWrite(loadPin, 0);
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00000001); //right
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00001011); //right
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00111010); //00111111
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00001010); //right
- shiftOut(dataPin, clockPin, LSBFIRST, 0b00001010); //right
- shiftOut(dataPin, clockPin, LSBFIRST, 0b10011110); //left
- digitalWrite(loadPin, 1);
- delay(10000);
- i=0;
- b=0;
- }
- }
- timeClient.begin();
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.show(); // Turn OFF all pixels ASAP
strip.setBrightness(25); // Set BRIGHTNESS to about 1/5 (max = 255)
+ for (int b=0; b<6; b++) {
+ strip.setPixelColor(b,255,0,0);
+ }
+ strip.show();
+ for (int b=0; b<3; b++) {
+ chase();
+ }
+
+ WiFi.hostname("VFD-Clock");
+ wifiManager.setHostname("VFD-Clock");
+ int i=0;
+ wifiManager.autoConnect("VFD WiFi Manager");
+
+ timeClient.begin();
+ server.begin();
+ timeClient.update();
+ timeClient.setUpdateInterval(86400000);
+
+ utcOffsetInSeconds = 3600*utc;
+ timeClient.setTimeOffset(utcOffsetInSeconds);
+ setTime(timeClient.getEpochTime());
+
+ //US DST CALC
+ if(month() == 11 && day() < 8 && day() < weekday()) {
+ dst=true;
+ }
+ if(month() == 11 && day() < 8 && weekday() == 1 && hour() < 1) {
+ dst=true;
+ }
+
+ if(month() < 11 && month() > 3) dst = true;
+
+ if(month() == 3 && day() > 7 && day() >= (weekday() + 7)) {
+ if(!(weekday() == 1 && hour() < 2)) dst = true;
+ }
+
+ if(dst) utcOffsetInSeconds += 3600UL;
+
+
+ timeClient.setTimeOffset(utcOffsetInSeconds);
+ setTime(timeClient.getEpochTime());
+ timeout=millis()+5000;
+ secondTick=millis()+1000;
}
void chase() {
}
void loop() {
- timeClient.update();
+ WiFiClient client = server.available();
unsigned int b=0;
- unsigned int Hour = timeClient.getHours();
- unsigned int Minute = timeClient.getMinutes();
- unsigned int Seconds = timeClient.getSeconds();
- digitalWrite(loadPin, 0);
- shiftOut(dataPin, clockPin, LSBFIRST, 0b000000000000000000000000000000000000000000000000);
- digitalWrite(loadPin, 1);
- chase();
- while (Seconds<60) {
- Hour1 = (Hour/10U) % 10;
- Hour2 = (Hour/1U) % 10;
- Minute1 = (Minute/10U) % 10;
- Minute2 = (Minute/1U) % 10;
- Second1 = (Seconds/10U) % 10;
- Second2 = (Seconds/1U) % 10;
- unsigned int pause = 1000;
- for (b=0; b<6; b++) {
- strip.setPixelColor(b, hsl(PColor, saturation, lightness));
- strip.show();
- }
- PColor++;
- if (PColor>360) {
- PColor=0;
- }
+ if (client) { // if !available yet, we return to this client in next loop
+ char line[64];
+ int l = client.readBytesUntil('\n', line, sizeof(line));
+ line[l] = 0;
+ client.find((char*) "\r\n\r\n");
+ if (strncmp_P(line, PSTR("POST"), strlen("POST")) == 0) {
+ l = client.readBytes(line, sizeof(line));
+ line[l] = 0;
+
+ // parse the parameters sent by the html form
+ const char* delims = "="; //was =&
+ strtok(line, delims);
+ const char* value = strtok(NULL, delims);
+ //strtok(NULL, delims);
+ //const char* pass = strtok(NULL, delims);
+
+ // send a response before attemting to connect to the WiFi network
+ // because it will reset the SoftAP and disconnect the client station
+ client.println(F("HTTP/1.1 200 OK"));
+ client.println(F("Connection: close"));
+ client.println(F("Refresh: 1"));
+ client.println();
+ client.println(F("<html><body><h3>Applying configuration</h3><br>please wait...</body></html>"));
+ client.stop();
- if (Second2==0) {
- casino();
- pause=500;
+ utc=atoi(value);
+ utcOffsetInSeconds = 3600*utc;
+
+ //US DST CALC
+ if(month() == 11 && day() < 8 && day() < weekday()) {
+ dst=true;
+ }
+ if(month() == 11 && day() < 8 && weekday() == 1 && hour() < 1) {
+ dst=true;
+ }
+
+ if(month() < 11 && month() > 3) dst = true;
+
+ if(month() == 3 && day() > 7 && day() >= (weekday() + 7)) {
+ if(!(weekday() == 1 && hour() < 2)) dst = true;
+ }
+
+ if(dst) utcOffsetInSeconds += 3600UL;
+
+ timeClient.update();
+ timeClient.setTimeOffset(utcOffsetInSeconds);
+ setTime(timeClient.getEpochTime());
+ EEPROM.begin(512);
+ EEPROM.put(0, utc);
+ //EEPROM.update(0, utc);
+ //EEPROM.commit();
+ EEPROM.end();
+ //setTime(timeClient.getEpochTime()+utcOffsetInSeconds);
} else {
- pause = 1000;
+ client.println();
+ client.print(data_header_html);
+ client.print(F("Current GMT offset: "));
+ client.println((utc));
+ client.print(F("Current GMT offset in seconds: "));
+ client.println((utcOffsetInSeconds));
+ client.print(data_body_html);
+ client.println();
+ client.print(data_footer_html);
+ client.stop();
+ }
+ } else {
+ if (millis()>=secondTick) {
+ secondTick=millis()+1000;
+ for (b=0; b<6; b++) {
+ strip.setPixelColor(b, hsl(PColor, saturation, 0));
+ }
+ PColor++;
+ if (PColor>360) {
+ PColor=0;
+ }
+ int secondd = (second()/1U) % 10;
+ int secondu = (second()/10U) % 10;
+ float percent = (float)secondd/10;
+ if (secondu==0) {
+ strip.setPixelColor(1, hsl(PColor, saturation, (float)((lightness*(1-percent)))));
+ strip.setPixelColor(0, hsl(PColor, saturation, (float)((lightness*percent))));
+ }
+ if (secondu==1) {
+ strip.setPixelColor(0, hsl(PColor, saturation, (float)((lightness*(1-percent)))));
+ strip.setPixelColor(5, hsl(PColor, saturation, (float)((lightness*percent))));
+ }
+ if (secondu==2) {
+ strip.setPixelColor(5, hsl(PColor, saturation, (float)((lightness*(1-percent)))));
+ strip.setPixelColor(4, hsl(PColor, saturation, (float)((lightness*percent))));
+ }
+ if (secondu==3) {
+ strip.setPixelColor(4, hsl(PColor, saturation, (float)((lightness*(1-percent)))));
+ strip.setPixelColor(3, hsl(PColor, saturation, (float)((lightness*percent))));
+ }
+ if (secondu==4) {
+ strip.setPixelColor(3, hsl(PColor, saturation, (float)((lightness*(1-percent)))));
+ strip.setPixelColor(2, hsl(PColor, saturation, (float)((lightness*percent))));
+ }
+ if (secondu==5) {
+ strip.setPixelColor(1, hsl(PColor, saturation, (float)((lightness*percent))));
+ strip.setPixelColor(2, hsl(PColor, saturation, (float)((lightness*(1-percent)))));
+ }
+ strip.show();
}
- digitalWrite(loadPin, 0);
- shiftOut(dataPin, clockPin, LSBFIRST, digits[Second2]); //right
- shiftOut(dataPin, clockPin, LSBFIRST, digits[Second1]); //left
- shiftOut(dataPin, clockPin, LSBFIRST, digits[Minute2]); //right
- shiftOut(dataPin, clockPin, LSBFIRST, digits[Minute1]); //left
- shiftOut(dataPin, clockPin, LSBFIRST, digits[Hour2]); //right
- shiftOut(dataPin, clockPin, LSBFIRST, digits[Hour1]); //left
- digitalWrite(loadPin, 1);
- delay(pause);
- Seconds = Seconds+1;
+ //if (millis()>=timeout) {
+ timeout=millis()+5000;
+
+ unsigned int b=0;
+ int Hour = hour();
+ int Minute = minute();
+ int Seconds = second();
+ int Hour1 = (Hour/10U) % 10;
+ int Hour2 = (Hour/1U) % 10;
+ int Minute1 = (Minute/10U) % 10;
+ int Minute2 = (Minute/1U) % 10;
+ int Second1 = (Seconds/10U) % 10;
+ int Second2 = (Seconds/1U) % 10;
+
+ if (minTmp != Minute2) {
+ //chase();
+ casino();
+ }
+ minTmp = Minute2;
+ //digitalWrite(loadPin, 0);
+ //shiftOut(dataPin, clockPin, LSBFIRST, 0b000000000000000000000000000000000000000000000000);
+ //digitalWrite(loadPin, 1);
+ //if (Second2==0 && Second1==0) {
+ // casino();
+ //}
+ digitalWrite(loadPin, 0);
+ shiftOut(dataPin, clockPin, LSBFIRST, digits[Second2]); //right
+ shiftOut(dataPin, clockPin, LSBFIRST, digits[Second1]); //left
+ shiftOut(dataPin, clockPin, LSBFIRST, digits[Minute2]); //right
+ shiftOut(dataPin, clockPin, LSBFIRST, digits[Minute1]); //left
+ shiftOut(dataPin, clockPin, LSBFIRST, digits[Hour2]); //right
+ shiftOut(dataPin, clockPin, LSBFIRST, digits[Hour1]); //left
+ digitalWrite(loadPin, 1);
+ //}
}
}