├── README.md ├── images ├── IMG_0617.jpg ├── IMG_0621.jpg ├── IMG_0818.jpg ├── IMG_0821.jpg ├── IMG_0826.jpg ├── IMG_0827.jpg ├── IMG_0829.jpg ├── IMG_0890.jpg ├── P10_matrix.jpg ├── PixelTime.jpg ├── pixel_weather.gif ├── PixelTime_small.jpg ├── pixel_weather3.xcf └── PixelTime_animated.GIF └── PixelTime.ino /README.md: -------------------------------------------------------------------------------- 1 | # PixelTime 2 | 3 | [PixelTime](https://2dom.github.io/PixelTime/) 4 | -------------------------------------------------------------------------------- /images/IMG_0617.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0617.jpg -------------------------------------------------------------------------------- /images/IMG_0621.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0621.jpg -------------------------------------------------------------------------------- /images/IMG_0818.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0818.jpg -------------------------------------------------------------------------------- /images/IMG_0821.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0821.jpg -------------------------------------------------------------------------------- /images/IMG_0826.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0826.jpg -------------------------------------------------------------------------------- /images/IMG_0827.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0827.jpg -------------------------------------------------------------------------------- /images/IMG_0829.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0829.jpg -------------------------------------------------------------------------------- /images/IMG_0890.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/IMG_0890.jpg -------------------------------------------------------------------------------- /images/P10_matrix.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/P10_matrix.jpg -------------------------------------------------------------------------------- /images/PixelTime.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/PixelTime.jpg -------------------------------------------------------------------------------- /images/pixel_weather.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/pixel_weather.gif -------------------------------------------------------------------------------- /images/PixelTime_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/PixelTime_small.jpg -------------------------------------------------------------------------------- /images/pixel_weather3.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/pixel_weather3.xcf -------------------------------------------------------------------------------- /images/PixelTime_animated.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2dom/PixelTime/HEAD/images/PixelTime_animated.GIF -------------------------------------------------------------------------------- /PixelTime.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #define logging 0 18 | 19 | 20 | MDNSResponder mdns; 21 | ESP8266WebServer server(80); 22 | Ticker display_ticker; 23 | 24 | int brightness=0; 25 | int dimm=0; 26 | 27 | 28 | // Pins for LED MATRIX 29 | #define P_LAT 16 30 | #define P_A 5 31 | #define P_B 4 32 | #define P_C 15 33 | #define P_OE 2 34 | P10_MATRIX display( P_LAT, P_OE,P_A,P_B,P_C); 35 | 36 | // Some standard colors 37 | uint16_t myRED = display.color565(255, 0, 0); 38 | uint16_t myGREEN = display.color565(0, 255, 0); 39 | uint16_t myBLUE = display.color565(0, 0, 255); 40 | uint16_t myWHITE = display.color565(255, 255, 255); 41 | uint16_t myYELLOW = display.color565(255, 255, 0); 42 | uint16_t myCYAN = display.color565(0, 255, 255); 43 | uint16_t myMAGENTA = display.color565(255, 0, 255); 44 | uint16_t myBLACK = display.color565(0, 0, 0); 45 | 46 | uint16 myCOLORS[8]={myRED,myGREEN,myBLUE,myWHITE,myYELLOW,myCYAN,myMAGENTA,myBLACK}; 47 | 48 | // Array that keeps low/high temperatures and icons for two days 49 | int temperature_show_low[2]; 50 | int temperature_show_high[2]; 51 | int icon_show_low[2]; 52 | int icon_show_high[2]; 53 | 54 | uint8_t weather_icons_a[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00 55 | ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xdf,0x07,0xdf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00 56 | ,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00 57 | ,0x00,0x20,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x07,0xdf,0x07,0xdf,0x07,0xff,0xff,0xe0,0xff,0xe0,0x00,0x00 58 | ,0x00,0x00,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0x00,0x20,0x00,0x00,0x07,0xdf,0x07,0xdf,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xdf,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00 59 | ,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x07,0xff,0x00,0x20,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0x07,0xdf,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00 60 | ,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00 61 | ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00 62 | ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00 63 | ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 64 | }; 65 | 66 | uint8_t weather_icons_b[]={0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00 67 | ,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xdf,0x07,0xdf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x20,0x00,0x00,0x07,0xdf,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x07,0xff,0x07,0xff,0x00,0x20,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00 68 | ,0x00,0x20,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x20,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00 69 | ,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00 70 | ,0xff,0xe0,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0xff,0xe0,0x00,0x00,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x07,0xff,0x07,0xff,0x00,0x20,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0xff,0xe0,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0xff,0xe0,0xff,0xe0,0x00,0x00 71 | ,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x07,0xdf,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0x00,0x00 72 | ,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xdf,0xff,0xe0,0xff,0xe0,0x00,0x00 73 | ,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x20,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x20,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00 74 | ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xdf,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xdf,0x07,0xff,0x07,0xff,0x00,0x00,0x00,0x00,0x07,0xdf,0x00,0x00,0x00,0x20,0x00,0x00,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0x07,0xff,0x07,0xff,0xff,0xe0,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x20 75 | ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 76 | }; 77 | 78 | unsigned long next_weather_update=0; 79 | bool weather_get_error; 80 | int sunset; 81 | 82 | boolean syncEventTriggered = false; // True if a time even has been triggered 83 | NTPSyncEvent_t ntpEvent; // Last triggered event 84 | 85 | const char INDEX_HTML[] = 86 | "" 87 | "" 88 | "" 89 | "" 90 | "ESP8266 Web Form Demo" 91 | "" 94 | "" 95 | "" 96 | "

Pixel Time - Setup

" 97 | "
" 98 | "
" 101 | "
" 104 | "
" 107 | "" 108 | "
" 109 | "" 110 | ""; 111 | 112 | // This gets all the weather data from openweathermap 113 | bool update_weather() 114 | { 115 | dimm=-1; 116 | 117 | while (brightness>0) 118 | yield(); 119 | 120 | display_ticker.detach(); 121 | 122 | 123 | 124 | String response; 125 | 126 | // Fetch current day - only sunset time information used for now 127 | HTTPClient http; 128 | http.begin("http://api.openweathermap.org/data/2.5/weather?q=Berlin,DE&APPID=sfsdfdsfsdfsdfsdfdsdfssdf"); //HTTP 129 | int httpCode = http.GET(); 130 | if(httpCode > 0) { 131 | // HTTP header has been send and Server response header has been handled 132 | Serial.printf("[HTTP] GET... code: %d\n", httpCode); 133 | 134 | if(httpCode == HTTP_CODE_OK) { 135 | response=http.getString(); 136 | int this_index = response.indexOf("sunset"); 137 | this_index = response.indexOf(":",this_index); 138 | int next_index = response.indexOf(",",this_index); 139 | sunset=response.substring(this_index+1,next_index).toInt(); 140 | 141 | //Serial.println(response); 142 | time_t time_now = now(); 143 | #ifdef logging 144 | Serial.println("Got Sunrise at " + String (sunset) + " Now:" + String (time_now)); 145 | #endif 146 | } 147 | } else { 148 | weather_get_error=true; 149 | Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str()); 150 | 151 | } 152 | http.end(); 153 | 154 | // Fetch forecast 155 | HTTPClient http2; 156 | 157 | http2.begin("http://api.openweathermap.org/data/2.5/forecast?q=Berlin,DE&APPID=asdsadsadasdasdadssadsda"); //HTTP 158 | int httpCode2 = http2.GET(); 159 | 160 | // httpCode will be negative on error 161 | if(httpCode2 > 0) { 162 | // HTTP header has been send and Server response header has been handled 163 | Serial.printf("[HTTP] GET... code: %d\n", httpCode2); 164 | 165 | // file found at server 166 | if(httpCode2 == HTTP_CODE_OK) { 167 | response=http2.getString(); 168 | 169 | weather_get_error=false; 170 | #ifdef logging 171 | Serial.println("Weather data received"); 172 | #endif 173 | http2.end(); 174 | 175 | } 176 | 177 | } else { 178 | weather_get_error=true; 179 | Serial.printf("[HTTP] GET... failed, error: %s\n", http2.errorToString(httpCode2).c_str()); 180 | 181 | // If is this the first fetch and it fails we show zeros 182 | if (temperature_show_low[0]>90) 183 | { 184 | temperature_show_low[0]=0; 185 | temperature_show_low[1]=0; 186 | 187 | temperature_show_high[0]=0; 188 | temperature_show_high[1]=0; 189 | 190 | icon_show_low[0]=1; 191 | icon_show_low[1]=1; 192 | 193 | icon_show_high[0]=1; 194 | icon_show_high[1]=1; 195 | 196 | } 197 | http2.end(); 198 | display_ticker.attach(0.001, display_updater); 199 | 200 | dimm=1; 201 | return false; 202 | } 203 | 204 | // Ok ... we have some valid response data to work on 205 | 206 | // First day 207 | int last_index = response.lastIndexOf("dt\""); 208 | int this_index = response.indexOf("dt\""); 209 | int next_index =0; 210 | int day_index=0; 211 | 212 | // Fill high/low with dummy data 213 | temperature_show_low[0]=+99; 214 | temperature_show_low[1]=+99; 215 | 216 | temperature_show_high[0]=-99; 217 | temperature_show_high[1]=-99; 218 | 219 | icon_show_low[0]=-99; 220 | icon_show_low[1]=-99; 221 | 222 | icon_show_high[0]=+99; 223 | icon_show_high[1]=+99; 224 | 225 | // Loop over list to find the high/low weather data for today and tomorrow 226 | int loop_count=-1; 227 | while (this_index>0) 228 | { 229 | loop_count++; 230 | 231 | // Get time of data set 232 | this_index = response.indexOf(":",this_index); 233 | String time_stamp = response.substring(this_index+1,this_index+11); 234 | int time_stamp_int = time_stamp.toInt(); 235 | int time_stamp_hour = hour(time_stamp_int); 236 | 237 | // Get temperature of data set 238 | this_index = response.indexOf("temp\"",this_index); 239 | this_index = response.indexOf(":",this_index); 240 | next_index = response.indexOf(",",this_index); 241 | 242 | String temperature = response.substring(this_index+1,next_index); 243 | int temperature_int = temperature.toInt()-273; 244 | 245 | // Get icon of data set 246 | this_index = response.indexOf("icon\"",this_index); 247 | this_index = response.indexOf(":",this_index); 248 | next_index = response.indexOf("\"",this_index+2); 249 | 250 | String icon = response.substring(this_index+2,next_index-1); 251 | String night_day = response.substring(next_index-1,next_index); 252 | int icon_int = icon.toInt(); 253 | 254 | // Map fetched icon data to display icon 255 | switch (icon_int) { 256 | case 1: 257 | //do something when var equals 1 258 | icon_int=0; 259 | break; 260 | case 2: 261 | icon_int=1; 262 | //do something when var equals 2 263 | break; 264 | case 3: 265 | icon_int=2; 266 | //do something when var equals 2 267 | break; 268 | case 4: 269 | icon_int=3; 270 | //do something when var equals 2 271 | break; 272 | case 9: 273 | icon_int=5; 274 | //do something when var equals 2 275 | break; 276 | case 10: 277 | icon_int=4; 278 | //do something when var equals 2 279 | break; 280 | case 11: 281 | icon_int=6; 282 | //do something when var equals 2 283 | break; 284 | case 13: 285 | icon_int=7; 286 | //do something when var equals 2 287 | break; 288 | case 50: 289 | icon_int=8; 290 | //do something when var equals 2 291 | break; 292 | default: 293 | icon_int=8; 294 | break; 295 | } 296 | 297 | // If there is only one data-set before midnight on the current day we have to display something - just use that midgight data 298 | if ((time_stamp_hour==0)) 299 | { 300 | if (loop_count==0) 301 | { 302 | temperature_show_low[day_index]=temperature_int; 303 | temperature_show_high[day_index]=temperature_int; 304 | 305 | icon_show_low[day_index]=icon_int; 306 | icon_show_high[day_index]=icon_int; 307 | } 308 | day_index++; 309 | } 310 | if (day_index==2) 311 | break; 312 | 313 | 314 | // Only use data between 6am and 6pm since we most likely will be inside otherwise 315 | if (((time_stamp_hour>=6)&&(time_stamp_hour<=18))||(temperature_show_low[day_index]>90)||(temperature_show_high[day_index]<-90)) 316 | { 317 | #ifdef logging 318 | Serial.println(String(day_index) + " Temp: " + String(temperature_int)+", Icon: " + String(icon_int)+" "+String(night_day)); 319 | #endif 320 | 321 | // Find the max and min over the day 322 | if (temperature_inttemperature_show_high[day_index]) 326 | temperature_show_high[day_index]=temperature_int; 327 | 328 | if (icon_int>icon_show_low[day_index]) 329 | icon_show_low[day_index]=icon_int; 330 | 331 | if (icon_int2100) 440 | { 441 | brightness=2100; 442 | dimm=0; 443 | } 444 | display.display(brightness/30); 445 | } 446 | 447 | // Start Accespoint for entering WIFI info 448 | void start_ap() 449 | { 450 | WiFi.softAP("PixelTime", ""); 451 | 452 | IPAddress myIP = WiFi.softAPIP(); 453 | 454 | //WiFi.begin(ssid, password); 455 | Serial.println(""); 456 | 457 | // // Wait for connection 458 | // while (WiFi.status() != WL_CONNECTED) { 459 | // delay(500); 460 | // Serial.print("."); 461 | // } 462 | 463 | 464 | Serial.print("IP address: "); 465 | //Serial.println(WiFi.localIP()); 466 | Serial.println( myIP); 467 | 468 | if (mdns.begin("esp8266WebForm", WiFi.localIP())) { 469 | Serial.println("MDNS responder started"); 470 | } 471 | 472 | server.on("/", handleRoot); 473 | 474 | server.onNotFound(handleNotFound); 475 | 476 | server.begin(); 477 | 478 | } 479 | 480 | void start_ota(){ 481 | ArduinoOTA.onStart([]() { 482 | Serial.println("Start"); 483 | }); 484 | ArduinoOTA.onEnd([]() { 485 | Serial.println("\nEnd"); 486 | }); 487 | ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { 488 | Serial.printf("Progress: %u%%\r", (progress / (total / 100))); 489 | }); 490 | ArduinoOTA.onError([](ota_error_t error) { 491 | Serial.printf("Error[%u]: ", error); 492 | if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); 493 | else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); 494 | else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); 495 | else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); 496 | else if (error == OTA_END_ERROR) Serial.println("End Failed"); 497 | }); 498 | ArduinoOTA.begin(); 499 | } 500 | 501 | void start_wifi() 502 | { 503 | 504 | Serial.println("Reading config from EEPROM"); 505 | String esid; 506 | String pass; 507 | String ntp; 508 | for (int i = 0; i < 32; ++i) 509 | { 510 | esid += char(EEPROM.read(i)); 511 | } 512 | 513 | for (int i = 32; i < 64; ++i) 514 | { 515 | pass += char(EEPROM.read(i)); 516 | } 517 | for (int i = 64; i < 96; ++i) 518 | { 519 | ntp += char(EEPROM.read(i)); 520 | } 521 | 522 | esid="youressid"; 523 | pass="yourwifikey"; 524 | ntp="0.de.pool.ntp.org"; 525 | Serial.println("essid: " + esid); 526 | Serial.println("pass: " + pass); 527 | Serial.println("ntp: " + ntp); 528 | //WiFi.mode(WIFI_OFF); 529 | //delay(1000); 530 | WiFi.mode(WIFI_STA); 531 | WiFi.begin(esid.c_str(), pass.c_str()); 532 | //server.close(); 533 | 534 | // Wait for connection 535 | unsigned long start_connect=millis(); 536 | while (WiFi.status() != WL_CONNECTED) { 537 | delay(500); 538 | Serial.print("."); 539 | 540 | if ((millis()-start_connect)>30000) 541 | ESP.restart(); 542 | 543 | } 544 | Serial.println(WiFi.localIP()); 545 | NTP.onNTPSyncEvent([](NTPSyncEvent_t event) { 546 | ntpEvent = event; 547 | syncEventTriggered = true; 548 | }); 549 | NTP.begin(ntp.c_str(), 1, true); 550 | NTP.setInterval(63); 551 | } 552 | 553 | void setup() { 554 | // put your setup code here, to run once: 555 | 556 | display.begin(); 557 | display.clearDisplay(); 558 | display.setTextColor(myCYAN); 559 | display.setCursor(2,0); 560 | display.print("Pixel"); 561 | display.setTextColor(myMAGENTA); 562 | display.setCursor(2,8); 563 | display.print("Time"); 564 | 565 | EEPROM.begin(512); 566 | Serial.begin(9600); 567 | 568 | start_wifi(); 569 | start_ota(); 570 | display_ticker.attach(0.001, display_updater); 571 | dimm=1; 572 | yield(); 573 | delay(3000); 574 | 575 | } 576 | 577 | union single_double{ 578 | uint8_t two[2]; 579 | uint16_t one; 580 | } this_single_double; 581 | 582 | // This draws the weather icons and temperature 583 | void draw_weather_icon (uint8_t icon, uint8_t location, int temp,bool ab) 584 | { 585 | display.setFont(&TomThumb); 586 | 587 | if (location>2) 588 | location=2; 589 | 590 | if (icon>10) 591 | icon=10; 592 | for (int yy=0; yy<10;yy++) 593 | { 594 | for (int xx=0; xx<10;xx++) 595 | { 596 | uint16_t byte_pos=(xx+icon*10)*2+yy*220; 597 | if (ab){ 598 | this_single_double.two[1]=weather_icons_a[byte_pos]; 599 | this_single_double.two[0]=weather_icons_a[byte_pos+1]; 600 | } 601 | else 602 | { 603 | this_single_double.two[1]=weather_icons_b[byte_pos]; 604 | this_single_double.two[0]=weather_icons_b[byte_pos+1]; 605 | } 606 | display.drawPixel(1+xx+location*12,yy,this_single_double.one); 607 | } 608 | 609 | } 610 | 611 | int pixel_shift=0; 612 | if ((temp>-10)&&(temp<10)) 613 | pixel_shift=2; 614 | 615 | if (location==0) 616 | display.setCursor(2+pixel_shift,16); 617 | else 618 | display.setCursor(14+pixel_shift,16); 619 | 620 | if (temp<0) 621 | { 622 | temp=temp*-1; 623 | if (location==0) 624 | display.drawPixel(pixel_shift,13,myWHITE); 625 | else 626 | display.drawPixel(12+pixel_shift,13,myWHITE); 627 | } 628 | display.println(temp); 629 | } 630 | 631 | // This draws the time 632 | void draw_time () 633 | { 634 | uint8_t this_hour= NTP.getHour(); 635 | uint8_t this_minute= NTP.getMinute(); 636 | uint8_t this_second= NTP.getSecond(); 637 | display.setFont(&TomThumb); 638 | display.setTextColor(myWHITE); 639 | display.setCursor(25,6); 640 | if (this_hour<10) 641 | display.println("0"+String(this_hour)); 642 | else 643 | display.println(this_hour); 644 | display.setCursor(25,16); 645 | 646 | if (this_minute<10) 647 | display.println("0"+String(this_minute)); 648 | else 649 | display.println(this_minute); 650 | 651 | // Dots 652 | display.drawPixel(27,8,myWHITE); 653 | display.drawPixel(29,8,myWHITE); 654 | 655 | } 656 | 657 | void process_ntp() 658 | { 659 | static int i = 0; 660 | static int last = 0; 661 | 662 | if (syncEventTriggered) { 663 | processSyncEvent(ntpEvent); 664 | syncEventTriggered = false; 665 | } 666 | 667 | if ((millis() - last) > 5100) { 668 | //Serial.println(millis() - last); 669 | last = millis(); 670 | #ifdef logging 671 | Serial.print(i); Serial.print(" "); 672 | Serial.print(NTP.getTimeDateString()); Serial.print(" "); 673 | Serial.print(NTP.isSummerTime() ? "Summer Time. " : "Winter Time. "); 674 | Serial.print("WiFi is "); 675 | Serial.print(WiFi.isConnected() ? "connected" : "not connected"); Serial.print(". "); 676 | Serial.print("Uptime: "); 677 | Serial.print(NTP.getUptimeString()); Serial.print(" since "); 678 | Serial.println(NTP.getTimeDateString(NTP.getFirstSync()).c_str()); 679 | #endif 680 | i++; 681 | } 682 | } 683 | 684 | void loop() { 685 | bool ret_code; 686 | unsigned long this_time=millis(); 687 | 688 | // Update weather data every 10 minutes 689 | if (this_time>next_weather_update) 690 | { 691 | ret_code=update_weather(); 692 | if (ret_code) 693 | next_weather_update=this_time+600000; 694 | else 695 | next_weather_update=this_time+5000; 696 | } 697 | 698 | display.clearDisplay(); 699 | draw_time (); 700 | 701 | // Exchange sun for moon icon when past sunset 702 | if ((sunset=2)); 714 | draw_weather_icon(icon_show_low[0],0,temperature_show_low[0],(NTP.getSecond()%4<2)); 715 | draw_weather_icon(icon_show_low[1],1,temperature_show_low[1],(NTP.getSecond()%4>=2)); 716 | draw_weather_icon(icon_show_low[1],1,temperature_show_low[1],(NTP.getSecond()%4<2)); 717 | } 718 | else 719 | { 720 | draw_weather_icon(icon_show_high[0],0,temperature_show_high[0],(NTP.getSecond()%4>=2)); 721 | draw_weather_icon(icon_show_high[0],0,temperature_show_high[0],(NTP.getSecond()%4<2)); 722 | draw_weather_icon(icon_show_high[1],1,temperature_show_high[1],(NTP.getSecond()%4>=2)); 723 | draw_weather_icon(icon_show_high[1],1,temperature_show_high[1],(NTP.getSecond()%4<2)); 724 | // Dot to indicate high or low 725 | display.drawPixel(0,11,myWHITE); 726 | } 727 | 728 | // If we had problems fetching the weather we display a red dot 729 | if (weather_get_error) 730 | display.drawPixel(0,0,myRED); 731 | 732 | server.handleClient(); 733 | ArduinoOTA.handle(); 734 | process_ntp(); 735 | 736 | 737 | delay(100); 738 | } 739 | --------------------------------------------------------------------------------