diff --git a/code/espurna/button.cpp b/code/espurna/button.cpp index da8acc5bce..4c931c39dd 100644 --- a/code/espurna/button.cpp +++ b/code/espurna/button.cpp @@ -22,11 +22,13 @@ Copyright (C) 2016-2019 by Xose Pérez #include "light.h" #include "ws.h" #include "mcp23s08.h" +#include "thermostat.h" #include "button_config.h" #include "libs/DebounceEvent.h" + BrokerBind(ButtonBroker); // TODO: if we are using such conversion helpers across the codebase, should convert() be in internal ns? diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 425173eebd..829f13ae3e 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -239,6 +239,26 @@ #define THERMOSTAT_DISPLAY_SUPPORT 0 #endif +#ifndef THERMOSTAT_DISPLAY_SSD1306_SDA +#define THERMOSTAT_DISPLAY_SSD1306_SDA 1 +#endif + +#ifndef THERMOSTAT_DISPLAY_SSD1306_SCL +#define THERMOSTAT_DISPLAY_SSD1306_SCL 3 +#endif + +#ifndef THERMOSTAT_DISPLAY_ST7735_CS +#define THERMOSTAT_DISPLAY_ST7735_CS 15 +#endif + +#ifndef THERMOSTAT_DISPLAY_ST7735_DC +#define THERMOSTAT_DISPLAY_ST7735_DC 2 +#endif + +#ifndef THERMOSTAT_DISPLAY_ST7735_RST +#define THERMOSTAT_DISPLAY_ST7735_RST -1 +#endif + #ifndef THERMOSTAT_DISPLAY_OFF_INTERVAL // Interval in seconds after which display will be switched off #define THERMOSTAT_DISPLAY_OFF_INTERVAL 0 // This will prevent it from burnout #endif // 0 - newer switch display off diff --git a/code/espurna/static/Roboto_Thin9pt8b.h b/code/espurna/static/Roboto_Thin9pt8b.h new file mode 100644 index 0000000000..a29f7d0b91 --- /dev/null +++ b/code/espurna/static/Roboto_Thin9pt8b.h @@ -0,0 +1,432 @@ +const uint8_t Roboto_Thin9pt8bBitmaps[] PROGMEM = { + 0xAA, 0xAA, 0x80, 0x80, 0xB6, 0xD0, 0x11, 0x09, 0x04, 0x9F, 0xF2, 0x21, + 0x10, 0x90, 0x48, 0xFF, 0xA2, 0x11, 0x08, 0x84, 0x40, 0x10, 0x10, 0x3C, + 0x42, 0x81, 0x81, 0x80, 0x60, 0x1C, 0x02, 0x01, 0x81, 0x81, 0x42, 0x3C, + 0x08, 0x08, 0x70, 0x12, 0x02, 0x22, 0x44, 0x89, 0x20, 0xE4, 0x01, 0x00, + 0x4E, 0x0A, 0x22, 0x44, 0x88, 0x91, 0x10, 0x1C, 0x3C, 0x11, 0x04, 0x41, + 0x10, 0x48, 0x0C, 0x03, 0x01, 0x22, 0x84, 0xA1, 0x28, 0x33, 0x0C, 0x3C, + 0xC0, 0xF0, 0x12, 0x44, 0x88, 0x88, 0x88, 0x88, 0x88, 0x44, 0x21, 0x84, + 0x42, 0x22, 0x11, 0x11, 0x11, 0x22, 0x24, 0x48, 0x20, 0x42, 0x9B, 0xC5, + 0x09, 0x23, 0x00, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x10, 0x10, 0x10, + 0xF0, 0xF0, 0x80, 0x04, 0x10, 0x82, 0x08, 0x41, 0x08, 0x20, 0x84, 0x10, + 0x42, 0x00, 0x3C, 0x42, 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x82, 0x42, 0x3C, 0x17, 0x91, 0x11, 0x11, 0x11, 0x11, 0x10, 0x3C, 0x42, + 0x82, 0x82, 0x02, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x40, 0xFF, 0x3C, + 0x42, 0x81, 0x81, 0x02, 0x02, 0x1C, 0x06, 0x01, 0x81, 0x81, 0x42, 0x3C, + 0x02, 0x07, 0x02, 0x82, 0x41, 0x21, 0x11, 0x08, 0x84, 0x82, 0x7F, 0xC0, + 0x80, 0x40, 0x20, 0x7F, 0x02, 0x04, 0x08, 0x1F, 0x21, 0x01, 0x03, 0x06, + 0x0C, 0x27, 0x80, 0x0C, 0x30, 0x40, 0x40, 0x80, 0xBC, 0xC2, 0x81, 0x81, + 0x81, 0x81, 0x42, 0x3C, 0xFF, 0x02, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, + 0x10, 0x10, 0x20, 0x20, 0x40, 0x3C, 0x42, 0x81, 0x81, 0x81, 0x42, 0x3C, + 0x66, 0x81, 0x81, 0x81, 0xC3, 0x3C, 0x3C, 0x42, 0x82, 0x81, 0x81, 0x81, + 0x81, 0x43, 0x3D, 0x02, 0x02, 0x04, 0x38, 0x80, 0x00, 0x80, 0x80, 0xF0, + 0x06, 0x31, 0x84, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0xC0, 0x60, 0x30, 0x10, 0xC6, 0x30, 0x00, 0x7A, 0x18, 0x41, 0x04, 0x21, + 0x08, 0x20, 0x00, 0x00, 0x20, 0x07, 0xE0, 0x30, 0x30, 0x80, 0x12, 0x00, + 0x24, 0x3C, 0x50, 0x88, 0x62, 0x10, 0xC4, 0x21, 0x88, 0x43, 0x10, 0x8A, + 0x23, 0x14, 0x39, 0xC4, 0x00, 0x04, 0x00, 0x04, 0x10, 0x07, 0xC0, 0x04, + 0x01, 0x80, 0x28, 0x09, 0x01, 0x20, 0x22, 0x08, 0x41, 0x04, 0x20, 0x87, + 0xF1, 0x01, 0x20, 0x28, 0x06, 0xFC, 0x82, 0x82, 0x82, 0x82, 0x82, 0xFC, + 0x82, 0x81, 0x81, 0x81, 0x82, 0xFC, 0x1E, 0x08, 0x64, 0x0A, 0x01, 0x80, + 0x20, 0x08, 0x02, 0x00, 0x80, 0x20, 0x14, 0x08, 0x82, 0x1F, 0x00, 0xFC, + 0x41, 0x20, 0x50, 0x28, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0xA0, 0x50, + 0x4F, 0xC0, 0xFF, 0x02, 0x04, 0x08, 0x10, 0x3F, 0xC0, 0x81, 0x02, 0x04, + 0x0F, 0xE0, 0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFE, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x1E, 0x08, 0x64, 0x0A, 0x01, 0x80, 0x20, 0x08, 0x02, + 0x1F, 0x80, 0x60, 0x14, 0x04, 0x83, 0x1F, 0x00, 0x80, 0xC0, 0x60, 0x30, + 0x18, 0x0C, 0x07, 0xFF, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x08, 0xFF, + 0xF8, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x81, 0x03, 0x06, 0x0A, 0x33, + 0x80, 0x81, 0x41, 0x21, 0x11, 0x09, 0x05, 0x03, 0x81, 0x20, 0x88, 0x42, + 0x21, 0x10, 0x48, 0x18, 0x81, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x81, + 0x02, 0x04, 0x0F, 0xE0, 0x80, 0x30, 0x06, 0x01, 0xE0, 0x3C, 0x0B, 0x41, + 0x68, 0x4D, 0x09, 0x91, 0x32, 0x46, 0x28, 0xC6, 0x18, 0x42, 0x80, 0xC0, + 0x70, 0x34, 0x1A, 0x0C, 0x86, 0x23, 0x11, 0x84, 0xC1, 0x60, 0xB0, 0x38, + 0x08, 0x1E, 0x08, 0x44, 0x0A, 0x01, 0x80, 0x60, 0x18, 0x06, 0x01, 0x80, + 0x60, 0x14, 0x08, 0x86, 0x1E, 0x00, 0xFC, 0x82, 0x81, 0x81, 0x81, 0x81, + 0x82, 0xFC, 0x80, 0x80, 0x80, 0x80, 0x80, 0x1E, 0x08, 0x44, 0x0A, 0x01, + 0x80, 0x60, 0x18, 0x06, 0x01, 0x80, 0x60, 0x14, 0x08, 0x84, 0x1E, 0x00, + 0x40, 0x08, 0xFC, 0x41, 0x20, 0x50, 0x28, 0x14, 0x0A, 0x09, 0xF8, 0x84, + 0x41, 0x20, 0x90, 0x28, 0x18, 0x3E, 0x20, 0xA0, 0x30, 0x14, 0x01, 0xC0, + 0x38, 0x03, 0x00, 0xC0, 0x60, 0x28, 0x23, 0xE0, 0xFF, 0x84, 0x02, 0x01, + 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x80, 0x81, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC3, 0x3C, + 0x80, 0x68, 0x09, 0x01, 0x20, 0x42, 0x08, 0x41, 0x08, 0x40, 0x88, 0x12, + 0x02, 0x40, 0x28, 0x06, 0x00, 0xC0, 0x81, 0x03, 0x81, 0x82, 0x42, 0x82, + 0x42, 0x82, 0x42, 0x44, 0x42, 0x44, 0x24, 0x44, 0x24, 0x24, 0x24, 0x28, + 0x28, 0x28, 0x18, 0x28, 0x18, 0x18, 0x08, 0x10, 0x80, 0xC0, 0x90, 0x84, + 0x42, 0x40, 0xC0, 0x20, 0x28, 0x24, 0x11, 0x10, 0x50, 0x28, 0x08, 0x80, + 0x68, 0x08, 0x82, 0x10, 0x81, 0x10, 0x24, 0x02, 0x80, 0x60, 0x04, 0x00, + 0x80, 0x10, 0x02, 0x00, 0x40, 0xFF, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, + 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x0F, 0xF8, 0xEA, 0xAA, 0xAA, 0xAA, + 0xB0, 0x84, 0x21, 0x04, 0x20, 0x84, 0x20, 0x84, 0x20, 0x84, 0xD5, 0x55, + 0x55, 0x55, 0x70, 0x23, 0x15, 0x28, 0xC4, 0xFE, 0x8C, 0x3C, 0x86, 0x08, + 0x13, 0xE8, 0x60, 0xC1, 0x86, 0xF4, 0x81, 0x02, 0x04, 0x0F, 0x90, 0xA0, + 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x5F, 0x00, 0x3C, 0x86, 0x0C, 0x08, 0x10, + 0x20, 0x41, 0x42, 0x78, 0x02, 0x04, 0x08, 0x13, 0xE8, 0x60, 0xC1, 0x83, + 0x06, 0x0C, 0x14, 0x27, 0xC0, 0x3C, 0x86, 0x0C, 0x1F, 0xF0, 0x20, 0x40, + 0x42, 0x78, 0x3A, 0x10, 0x8F, 0x21, 0x08, 0x42, 0x10, 0x84, 0x20, 0x3E, + 0x86, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x42, 0x7C, 0x08, 0x14, 0x27, 0x80, + 0x82, 0x08, 0x20, 0xBB, 0x18, 0x61, 0x86, 0x18, 0x61, 0x86, 0x10, 0x92, + 0xAA, 0xAA, 0x80, 0x20, 0x12, 0x49, 0x24, 0x92, 0x49, 0xC0, 0x81, 0x02, + 0x04, 0x08, 0x51, 0x24, 0x50, 0xC1, 0x42, 0x44, 0x48, 0x90, 0xC0, 0xAA, + 0xAA, 0xAA, 0xA0, 0xBC, 0x73, 0x0A, 0x2C, 0x10, 0x60, 0x81, 0x82, 0x06, + 0x08, 0x18, 0x20, 0x60, 0x81, 0x82, 0x06, 0x08, 0x10, 0xBB, 0x18, 0x61, + 0x86, 0x18, 0x61, 0x86, 0x10, 0x3C, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x81, 0x42, 0x3C, 0xF9, 0x0A, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x85, 0xF2, + 0x04, 0x08, 0x10, 0x00, 0x3E, 0x86, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x42, + 0x7C, 0x08, 0x10, 0x20, 0x40, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x06, + 0x0C, 0x07, 0x01, 0x80, 0xC1, 0x82, 0xF8, 0x21, 0x09, 0xF2, 0x10, 0x84, + 0x21, 0x08, 0x41, 0x80, 0x86, 0x18, 0x61, 0x86, 0x18, 0x61, 0x85, 0xF0, + 0x83, 0x06, 0x0C, 0x24, 0x49, 0x0A, 0x14, 0x30, 0x20, 0x84, 0x18, 0x61, + 0x8A, 0x28, 0xA2, 0x49, 0x24, 0x94, 0x51, 0x45, 0x14, 0x30, 0xC2, 0x08, + 0x83, 0x09, 0x21, 0x41, 0x06, 0x0A, 0x22, 0x85, 0x04, 0x83, 0x82, 0x82, + 0x84, 0x44, 0x44, 0x28, 0x28, 0x30, 0x10, 0x10, 0x20, 0x20, 0xC0, 0xFE, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x80, 0xFF, 0x09, 0x88, 0x84, + 0x21, 0x08, 0x44, 0x10, 0x84, 0x21, 0x04, 0x20, 0xC0, 0xAA, 0xAA, 0xAA, + 0xA8, 0x82, 0x08, 0x42, 0x10, 0x84, 0x10, 0x44, 0x42, 0x10, 0x84, 0x44, + 0x00, 0x70, 0x63, 0x28, 0x38, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, + 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, + 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, + 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, + 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, + 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, + 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, + 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, + 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, + 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, + 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, + 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, + 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, + 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, + 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, + 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, + 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, + 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, + 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, + 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, + 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, + 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, + 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, + 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, + 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, + 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, + 0x58, 0xE3, 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, + 0xFC, 0xFE, 0x38, 0xF5, 0xD6, 0xDA, 0x6D, 0xD7, 0x58, 0xE3, 0xFC, 0x80, + 0xAA, 0xAA, 0x80, 0x10, 0x10, 0x3C, 0x42, 0x81, 0x80, 0x80, 0x80, 0x80, + 0x81, 0x42, 0x3C, 0x10, 0x10, 0x1E, 0x21, 0x41, 0x40, 0x40, 0x40, 0xF8, + 0x40, 0x40, 0x40, 0x40, 0x40, 0xFF, 0x9F, 0x2C, 0x19, 0x01, 0x40, 0x28, + 0x03, 0x00, 0x60, 0x0C, 0x02, 0x40, 0x4C, 0x1A, 0x7C, 0x80, 0x81, 0xA0, + 0x90, 0x84, 0x42, 0x40, 0xA0, 0x60, 0xFE, 0x08, 0x04, 0x1F, 0xC1, 0x00, + 0x80, 0xAA, 0xA8, 0x2A, 0xA8, 0x3E, 0x20, 0xA0, 0x50, 0x14, 0x01, 0xC1, + 0x99, 0x02, 0x80, 0xC0, 0x58, 0x43, 0xC0, 0x34, 0x0A, 0x04, 0x82, 0x3E, + 0x00, 0x90, 0x0F, 0x81, 0x83, 0x08, 0x08, 0x8E, 0x28, 0x89, 0x48, 0x46, + 0x40, 0x32, 0x11, 0x88, 0x92, 0x38, 0x88, 0x08, 0x60, 0xC0, 0xF8, 0x00, + 0xF4, 0x85, 0xE9, 0x4B, 0xE0, 0x25, 0x29, 0x28, 0x91, 0x22, 0x40, 0xFE, + 0x04, 0x08, 0xF0, 0x0F, 0x81, 0x82, 0x10, 0x08, 0x9E, 0x28, 0x89, 0x44, + 0x46, 0x22, 0x31, 0xE1, 0x88, 0x92, 0x44, 0x90, 0x08, 0x60, 0x80, 0xF8, + 0x00, 0xF8, 0x79, 0x99, 0x70, 0x08, 0x08, 0x08, 0x08, 0xFF, 0x08, 0x08, + 0x08, 0x00, 0x00, 0x7F, 0xF4, 0x84, 0x44, 0x43, 0xE0, 0xF9, 0x16, 0x19, + 0xF0, 0x60, 0x86, 0x18, 0x61, 0x86, 0x18, 0x61, 0x87, 0xF8, 0x20, 0x82, + 0x00, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x04, 0x10, 0x41, 0x04, 0x80, + 0xB7, 0x74, 0x92, 0x48, 0x7A, 0x28, 0x61, 0x86, 0x27, 0x80, 0x92, 0x44, + 0x89, 0x4A, 0x49, 0x00, 0x60, 0x14, 0x00, 0x84, 0x11, 0x02, 0x20, 0x48, + 0x09, 0x10, 0x4E, 0x11, 0x42, 0x48, 0x91, 0x23, 0xF0, 0x04, 0x60, 0x0A, + 0x00, 0x21, 0x02, 0x20, 0x22, 0x02, 0x40, 0x25, 0xE0, 0xA2, 0x10, 0x21, + 0x04, 0x20, 0x84, 0x10, 0x01, 0xF0, 0xF0, 0x09, 0x00, 0x10, 0x46, 0x08, + 0x10, 0x89, 0x10, 0xF1, 0x20, 0x2E, 0x04, 0xA0, 0x52, 0x0A, 0x21, 0x3F, + 0x00, 0x20, 0x10, 0x00, 0x00, 0x30, 0x84, 0x20, 0x82, 0x08, 0x61, 0x78, + 0x10, 0x01, 0x80, 0x00, 0x02, 0x00, 0xC0, 0x14, 0x04, 0x80, 0x90, 0x11, + 0x04, 0x20, 0x82, 0x10, 0x43, 0xF8, 0x80, 0x90, 0x14, 0x03, 0x02, 0x00, + 0x80, 0x00, 0x02, 0x00, 0xC0, 0x14, 0x04, 0x80, 0x90, 0x11, 0x04, 0x20, + 0x82, 0x10, 0x43, 0xF8, 0x80, 0x90, 0x14, 0x03, 0x0C, 0x02, 0x60, 0x00, + 0x02, 0x00, 0xC0, 0x14, 0x04, 0x80, 0x90, 0x11, 0x04, 0x20, 0x82, 0x10, + 0x43, 0xF8, 0x80, 0x90, 0x14, 0x03, 0x1D, 0x04, 0xE0, 0x00, 0x02, 0x00, + 0xC0, 0x14, 0x04, 0x80, 0x90, 0x11, 0x04, 0x20, 0x82, 0x10, 0x43, 0xF8, + 0x80, 0x90, 0x14, 0x03, 0x22, 0x02, 0x00, 0x00, 0x02, 0x00, 0xC0, 0x14, + 0x04, 0x80, 0x90, 0x11, 0x04, 0x20, 0x82, 0x10, 0x43, 0xF8, 0x80, 0x90, + 0x14, 0x03, 0x0E, 0x02, 0x40, 0x38, 0x00, 0x00, 0x40, 0x18, 0x02, 0x80, + 0x90, 0x12, 0x02, 0x20, 0x84, 0x10, 0x42, 0x08, 0x7F, 0x10, 0x12, 0x02, + 0x80, 0x60, 0x00, 0xFE, 0x01, 0x80, 0x01, 0x80, 0x02, 0x80, 0x04, 0x80, + 0x04, 0x80, 0x08, 0x7C, 0x10, 0x80, 0x10, 0x80, 0x1F, 0x80, 0x20, 0x80, + 0x40, 0x80, 0x80, 0x7F, 0x1E, 0x08, 0x64, 0x0A, 0x01, 0x80, 0x20, 0x08, + 0x02, 0x00, 0x80, 0x20, 0x14, 0x08, 0x82, 0x1F, 0x02, 0x00, 0xC0, 0x10, + 0x0C, 0x00, 0x40, 0x60, 0x07, 0xF8, 0x10, 0x20, 0x40, 0x81, 0xFE, 0x04, + 0x08, 0x10, 0x20, 0x7F, 0x08, 0x20, 0x07, 0xF8, 0x10, 0x20, 0x40, 0x81, + 0xFE, 0x04, 0x08, 0x10, 0x20, 0x7F, 0x30, 0x98, 0x07, 0xF8, 0x10, 0x20, + 0x40, 0x81, 0xFE, 0x04, 0x08, 0x10, 0x20, 0x7F, 0x88, 0x80, 0x07, 0xF8, + 0x10, 0x20, 0x40, 0x81, 0xFE, 0x04, 0x08, 0x10, 0x20, 0x7F, 0x8C, 0x12, + 0x49, 0x24, 0x92, 0x49, 0x62, 0xAA, 0xAA, 0xAA, 0x64, 0xC0, 0x42, 0x10, + 0x84, 0x21, 0x08, 0x42, 0x10, 0x84, 0x90, 0x02, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x7E, 0x20, 0x48, 0x0A, 0x02, 0x80, 0x60, 0x1F, 0x86, 0x01, + 0x80, 0x60, 0x28, 0x0A, 0x04, 0x7E, 0x00, 0x3A, 0x27, 0x00, 0x10, 0x18, + 0x0E, 0x06, 0x83, 0x41, 0x90, 0xC4, 0x62, 0x30, 0x98, 0x2C, 0x16, 0x07, + 0x01, 0x10, 0x03, 0x00, 0x00, 0x78, 0x21, 0x10, 0x28, 0x06, 0x01, 0x80, + 0x60, 0x18, 0x06, 0x01, 0x80, 0x50, 0x22, 0x18, 0x78, 0x04, 0x02, 0x00, + 0x00, 0x78, 0x21, 0x10, 0x28, 0x06, 0x01, 0x80, 0x60, 0x18, 0x06, 0x01, + 0x80, 0x50, 0x22, 0x18, 0x78, 0x18, 0x09, 0x80, 0x00, 0x78, 0x21, 0x10, + 0x28, 0x06, 0x01, 0x80, 0x60, 0x18, 0x06, 0x01, 0x80, 0x50, 0x22, 0x18, + 0x78, 0x3A, 0x13, 0x80, 0x00, 0x78, 0x21, 0x10, 0x28, 0x06, 0x01, 0x80, + 0x60, 0x18, 0x06, 0x01, 0x80, 0x50, 0x22, 0x18, 0x78, 0x22, 0x04, 0x00, + 0x00, 0x78, 0x21, 0x10, 0x28, 0x06, 0x01, 0x80, 0x60, 0x18, 0x06, 0x01, + 0x80, 0x50, 0x22, 0x18, 0x78, 0x82, 0x88, 0xA0, 0x82, 0x88, 0xA0, 0x80, + 0x1E, 0xC8, 0x64, 0x1A, 0x05, 0x82, 0x61, 0x18, 0x46, 0x21, 0x90, 0x64, + 0x1A, 0x09, 0x06, 0x7E, 0x00, 0x20, 0x18, 0x00, 0x81, 0x81, 0x81, 0x81, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC3, 0x3C, 0x04, 0x08, 0x00, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC3, + 0x3C, 0x18, 0x26, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x81, 0x81, 0x81, 0xC3, 0x3C, 0x44, 0x20, 0x00, 0x81, 0x81, 0x81, 0x81, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC3, 0x3C, 0x02, 0x00, 0x80, + 0x00, 0x40, 0x34, 0x04, 0x41, 0x08, 0x40, 0x88, 0x12, 0x01, 0x40, 0x30, + 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x80, 0x80, 0x80, 0xFC, 0x82, + 0x82, 0x81, 0x81, 0x82, 0x82, 0xFC, 0x80, 0x80, 0x78, 0x44, 0x84, 0x84, + 0x88, 0x88, 0x88, 0x84, 0x82, 0x81, 0x81, 0xA1, 0x9E, 0x20, 0x30, 0x01, + 0xE4, 0x30, 0x40, 0x9F, 0x43, 0x06, 0x0C, 0x37, 0xA0, 0x04, 0x10, 0x01, + 0xE4, 0x30, 0x40, 0x9F, 0x43, 0x06, 0x0C, 0x37, 0xA0, 0x18, 0x4C, 0x01, + 0xE4, 0x30, 0x40, 0x9F, 0x43, 0x06, 0x0C, 0x37, 0xA0, 0x3A, 0x9C, 0x01, + 0xE4, 0x30, 0x40, 0x9F, 0x43, 0x06, 0x0C, 0x37, 0xA0, 0x44, 0x40, 0x01, + 0xE4, 0x30, 0x40, 0x9F, 0x43, 0x06, 0x0C, 0x37, 0xA0, 0x1C, 0x48, 0x70, + 0x03, 0xC8, 0x60, 0x81, 0x3E, 0x86, 0x0C, 0x18, 0x6F, 0x40, 0x78, 0xF4, + 0x28, 0x60, 0x82, 0x04, 0x17, 0xFF, 0xC1, 0x02, 0x08, 0x10, 0x40, 0x85, + 0x0B, 0xC7, 0x80, 0x3C, 0x86, 0x0C, 0x08, 0x10, 0x20, 0x41, 0x42, 0x78, + 0x40, 0xC0, 0x83, 0x00, 0x20, 0x30, 0x01, 0xE4, 0x30, 0x60, 0xFF, 0x81, + 0x02, 0x02, 0x13, 0xC0, 0x04, 0x10, 0x01, 0xE4, 0x30, 0x60, 0xFF, 0x81, + 0x02, 0x02, 0x13, 0xC0, 0x30, 0x98, 0x01, 0xE4, 0x30, 0x60, 0xFF, 0x81, + 0x02, 0x02, 0x13, 0xC0, 0x44, 0x40, 0x01, 0xE4, 0x30, 0x60, 0xFF, 0x81, + 0x02, 0x02, 0x13, 0xC0, 0x8C, 0x24, 0x92, 0x49, 0x24, 0x62, 0xAA, 0xAA, + 0x80, 0x64, 0xC0, 0x42, 0x10, 0x84, 0x21, 0x08, 0x42, 0x00, 0x90, 0x04, + 0x44, 0x44, 0x44, 0x44, 0x40, 0x20, 0x1B, 0x04, 0x1A, 0x02, 0x3D, 0x43, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x76, 0x70, 0x2E, 0xC6, 0x18, + 0x61, 0x86, 0x18, 0x61, 0x84, 0x20, 0x18, 0x00, 0x3C, 0x42, 0x81, 0x81, + 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x04, 0x08, 0x00, 0x3C, 0x42, 0x81, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x30, 0x4C, 0x00, 0x3C, 0x42, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x74, 0x9C, 0x00, 0x3C, + 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x44, 0x20, 0x00, + 0x3C, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x08, 0x00, + 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3E, 0x46, 0x85, 0x89, + 0x89, 0x91, 0x91, 0xA1, 0x62, 0x3C, 0x40 }; + +const GFXglyph Roboto_Thin9pt8bGlyphs[] PROGMEM = { + { 0, 0, 0, 4, 0, 1 }, // 0x20 ' ' + { 0, 2, 13, 3, 1, -12 }, // 0x21 '!' + { 4, 3, 4, 5, 1, -13 }, // 0x22 '"' + { 6, 9, 13, 10, 1, -12 }, // 0x23 '#' + { 21, 8, 17, 10, 1, -14 }, // 0x24 '$' + { 38, 11, 13, 13, 1, -12 }, // 0x25 '%' + { 56, 10, 13, 11, 1, -12 }, // 0x26 '&' + { 73, 1, 4, 3, 1, -13 }, // 0x27 ''' + { 74, 4, 18, 5, 1, -13 }, // 0x28 '(' + { 83, 4, 18, 5, 0, -13 }, // 0x29 ')' + { 92, 7, 7, 8, 1, -12 }, // 0x2A '*' + { 99, 8, 9, 10, 1, -9 }, // 0x2B '+' + { 108, 1, 4, 3, 1, 0 }, // 0x2C ',' + { 109, 4, 1, 5, 0, -5 }, // 0x2D '-' + { 110, 2, 1, 4, 1, 0 }, // 0x2E '.' + { 111, 6, 14, 7, 0, -12 }, // 0x2F '/' + { 122, 8, 13, 10, 1, -12 }, // 0x30 '0' + { 135, 4, 13, 10, 2, -12 }, // 0x31 '1' + { 142, 8, 13, 10, 1, -12 }, // 0x32 '2' + { 155, 8, 13, 10, 1, -12 }, // 0x33 '3' + { 168, 9, 13, 10, 1, -12 }, // 0x34 '4' + { 183, 7, 13, 10, 2, -12 }, // 0x35 '5' + { 195, 8, 13, 10, 1, -12 }, // 0x36 '6' + { 208, 8, 13, 10, 1, -12 }, // 0x37 '7' + { 221, 8, 13, 10, 1, -12 }, // 0x38 '8' + { 234, 8, 13, 10, 1, -12 }, // 0x39 '9' + { 247, 2, 9, 3, 1, -8 }, // 0x3A ':' + { 250, 1, 12, 3, 1, -8 }, // 0x3B ';' + { 252, 7, 7, 9, 1, -8 }, // 0x3C '<' + { 259, 8, 5, 10, 1, -7 }, // 0x3D '=' + { 264, 7, 7, 9, 1, -8 }, // 0x3E '>' + { 271, 6, 13, 8, 1, -12 }, // 0x3F '?' + { 281, 15, 16, 17, 1, -11 }, // 0x40 '@' + { 311, 11, 13, 11, 0, -12 }, // 0x41 'A' + { 329, 8, 13, 11, 2, -12 }, // 0x42 'B' + { 342, 10, 13, 12, 1, -12 }, // 0x43 'C' + { 359, 9, 13, 12, 2, -12 }, // 0x44 'D' + { 374, 7, 13, 10, 2, -12 }, // 0x45 'E' + { 386, 8, 13, 10, 2, -12 }, // 0x46 'F' + { 399, 10, 13, 12, 1, -12 }, // 0x47 'G' + { 416, 9, 13, 13, 2, -12 }, // 0x48 'H' + { 431, 1, 13, 5, 2, -12 }, // 0x49 'I' + { 433, 7, 13, 10, 1, -12 }, // 0x4A 'J' + { 445, 9, 13, 11, 2, -12 }, // 0x4B 'K' + { 460, 7, 13, 9, 2, -12 }, // 0x4C 'L' + { 472, 11, 13, 15, 2, -12 }, // 0x4D 'M' + { 490, 9, 13, 13, 2, -12 }, // 0x4E 'N' + { 505, 10, 13, 12, 1, -12 }, // 0x4F 'O' + { 522, 8, 13, 11, 2, -12 }, // 0x50 'P' + { 535, 10, 15, 12, 1, -12 }, // 0x51 'Q' + { 554, 9, 13, 12, 2, -12 }, // 0x52 'R' + { 569, 9, 13, 11, 1, -12 }, // 0x53 'S' + { 584, 9, 13, 11, 1, -12 }, // 0x54 'T' + { 599, 8, 13, 12, 2, -12 }, // 0x55 'U' + { 612, 11, 13, 11, 0, -12 }, // 0x56 'V' + { 630, 16, 13, 16, 0, -12 }, // 0x57 'W' + { 656, 9, 13, 11, 1, -12 }, // 0x58 'X' + { 671, 11, 13, 11, 0, -12 }, // 0x59 'Y' + { 689, 9, 13, 11, 1, -12 }, // 0x5A 'Z' + { 704, 2, 18, 4, 2, -14 }, // 0x5B '[' + { 709, 5, 14, 7, 1, -12 }, // 0x5C '\' + { 718, 2, 18, 4, 0, -14 }, // 0x5D ']' + { 723, 5, 6, 7, 1, -12 }, // 0x5E '^' + { 727, 7, 1, 7, 0, 1 }, // 0x5F '_' + { 728, 3, 2, 5, 1, -12 }, // 0x60 '`' + { 729, 7, 10, 10, 1, -9 }, // 0x61 'a' + { 738, 7, 14, 10, 2, -13 }, // 0x62 'b' + { 751, 7, 10, 9, 1, -9 }, // 0x63 'c' + { 760, 7, 14, 10, 1, -13 }, // 0x64 'd' + { 773, 7, 10, 9, 1, -9 }, // 0x65 'e' + { 782, 5, 14, 6, 1, -13 }, // 0x66 'f' + { 791, 7, 14, 10, 1, -9 }, // 0x67 'g' + { 804, 6, 14, 10, 2, -13 }, // 0x68 'h' + { 815, 2, 13, 4, 1, -12 }, // 0x69 'i' + { 819, 3, 17, 4, -1, -12 }, // 0x6A 'j' + { 826, 7, 14, 9, 2, -13 }, // 0x6B 'k' + { 839, 2, 14, 4, 1, -13 }, // 0x6C 'l' + { 843, 14, 10, 16, 1, -9 }, // 0x6D 'm' + { 861, 6, 10, 10, 2, -9 }, // 0x6E 'n' + { 869, 8, 10, 10, 1, -9 }, // 0x6F 'o' + { 879, 7, 14, 10, 2, -9 }, // 0x70 'p' + { 892, 7, 14, 10, 1, -9 }, // 0x71 'q' + { 905, 4, 10, 6, 2, -9 }, // 0x72 'r' + { 910, 7, 10, 9, 1, -9 }, // 0x73 's' + { 919, 5, 13, 6, 0, -12 }, // 0x74 't' + { 928, 6, 10, 10, 2, -9 }, // 0x75 'u' + { 936, 7, 10, 9, 1, -9 }, // 0x76 'v' + { 945, 12, 10, 14, 1, -9 }, // 0x77 'w' + { 960, 7, 10, 9, 1, -9 }, // 0x78 'x' + { 969, 8, 14, 9, 1, -9 }, // 0x79 'y' + { 983, 8, 10, 9, 1, -9 }, // 0x7A 'z' + { 993, 5, 18, 6, 1, -13 }, // 0x7B '{' + { 1005, 2, 15, 4, 1, -12 }, // 0x7C '|' + { 1009, 5, 18, 6, 0, -13 }, // 0x7D '}' + { 1021, 10, 3, 12, 1, -6 }, // 0x7E '~' + { 1025, 6, 13, 8, 1, -12 }, // 0x7F + { 1035, 6, 13, 8, 1, -12 }, // 0x80 + { 1045, 6, 13, 8, 1, -12 }, // 0x81 + { 1055, 6, 13, 8, 1, -12 }, // 0x82 + { 1065, 6, 13, 8, 1, -12 }, // 0x83 + { 1075, 6, 13, 8, 1, -12 }, // 0x84 + { 1085, 6, 13, 8, 1, -12 }, // 0x85 + { 1095, 6, 13, 8, 1, -12 }, // 0x86 + { 1105, 6, 13, 8, 1, -12 }, // 0x87 + { 1115, 6, 13, 8, 1, -12 }, // 0x88 + { 1125, 6, 13, 8, 1, -12 }, // 0x89 + { 1135, 6, 13, 8, 1, -12 }, // 0x8A + { 1145, 6, 13, 8, 1, -12 }, // 0x8B + { 1155, 6, 13, 8, 1, -12 }, // 0x8C + { 1165, 6, 13, 8, 1, -12 }, // 0x8D + { 1175, 6, 13, 8, 1, -12 }, // 0x8E + { 1185, 6, 13, 8, 1, -12 }, // 0x8F + { 1195, 6, 13, 8, 1, -12 }, // 0x90 + { 1205, 6, 13, 8, 1, -12 }, // 0x91 + { 1215, 6, 13, 8, 1, -12 }, // 0x92 + { 1225, 6, 13, 8, 1, -12 }, // 0x93 + { 1235, 6, 13, 8, 1, -12 }, // 0x94 + { 1245, 6, 13, 8, 1, -12 }, // 0x95 + { 1255, 6, 13, 8, 1, -12 }, // 0x96 + { 1265, 6, 13, 8, 1, -12 }, // 0x97 + { 1275, 6, 13, 8, 1, -12 }, // 0x98 + { 1285, 6, 13, 8, 1, -12 }, // 0x99 + { 1295, 6, 13, 8, 1, -12 }, // 0x9A + { 1305, 6, 13, 8, 1, -12 }, // 0x9B + { 1315, 6, 13, 8, 1, -12 }, // 0x9C + { 1325, 6, 13, 8, 1, -12 }, // 0x9D + { 1335, 6, 13, 8, 1, -12 }, // 0x9E + { 1345, 6, 13, 8, 1, -12 }, // 0x9F + { 1355, 0, 0, 4, 0, 1 }, // 0xA0 + { 1355, 2, 13, 4, 1, -9 }, // 0xA1 + { 1359, 8, 14, 10, 1, -11 }, // 0xA2 + { 1373, 8, 13, 10, 1, -12 }, // 0xA3 + { 1386, 11, 11, 13, 1, -10 }, // 0xA4 + { 1402, 9, 13, 9, 0, -12 }, // 0xA5 + { 1417, 2, 15, 4, 1, -12 }, // 0xA6 + { 1421, 9, 17, 11, 1, -12 }, // 0xA7 + { 1441, 4, 1, 8, 2, -12 }, // 0xA8 + { 1442, 13, 13, 15, 1, -12 }, // 0xA9 + { 1464, 5, 7, 8, 2, -12 }, // 0xAA + { 1469, 6, 7, 8, 1, -7 }, // 0xAB + { 1475, 7, 3, 10, 1, -6 }, // 0xAC + { 1478, 4, 1, 5, 0, -5 }, // 0xAD + { 1479, 13, 13, 15, 1, -12 }, // 0xAE + { 1501, 5, 1, 7, 1, -12 }, // 0xAF + { 1502, 4, 5, 7, 1, -12 }, // 0xB0 + { 1505, 8, 11, 9, 0, -10 }, // 0xB1 + { 1516, 5, 7, 6, 1, -12 }, // 0xB2 + { 1521, 4, 7, 6, 1, -12 }, // 0xB3 + { 1525, 2, 2, 4, 1, -12 }, // 0xB4 + { 1526, 6, 14, 10, 2, -9 }, // 0xB5 + { 1537, 6, 13, 8, 1, -12 }, // 0xB6 + { 1547, 2, 1, 4, 1, -6 }, // 0xB7 + { 1548, 2, 4, 4, 1, 1 }, // 0xB8 + { 1549, 3, 7, 6, 1, -12 }, // 0xB9 + { 1552, 6, 7, 8, 1, -12 }, // 0xBA + { 1558, 6, 7, 8, 1, -7 }, // 0xBB + { 1564, 11, 13, 13, 1, -12 }, // 0xBC + { 1582, 12, 13, 13, 1, -12 }, // 0xBD + { 1602, 12, 13, 14, 1, -12 }, // 0xBE + { 1622, 6, 13, 8, 1, -9 }, // 0xBF + { 1632, 11, 16, 11, 0, -15 }, // 0xC0 + { 1654, 11, 16, 11, 0, -15 }, // 0xC1 + { 1676, 11, 16, 11, 0, -15 }, // 0xC2 + { 1698, 11, 16, 11, 0, -15 }, // 0xC3 + { 1720, 11, 16, 11, 0, -15 }, // 0xC4 + { 1742, 11, 17, 11, 0, -16 }, // 0xC5 + { 1766, 16, 13, 16, 0, -12 }, // 0xC6 + { 1792, 10, 17, 12, 1, -12 }, // 0xC7 + { 1814, 7, 16, 10, 2, -15 }, // 0xC8 + { 1828, 7, 16, 10, 2, -15 }, // 0xC9 + { 1842, 7, 16, 10, 2, -15 }, // 0xCA + { 1856, 7, 16, 10, 2, -15 }, // 0xCB + { 1870, 3, 16, 5, 0, -15 }, // 0xCC + { 1876, 2, 16, 5, 2, -15 }, // 0xCD + { 1880, 5, 16, 5, 0, -15 }, // 0xCE + { 1890, 4, 16, 5, 0, -15 }, // 0xCF + { 1898, 10, 13, 12, 1, -12 }, // 0xD0 + { 1915, 9, 16, 13, 2, -15 }, // 0xD1 + { 1933, 10, 16, 12, 1, -15 }, // 0xD2 + { 1953, 10, 16, 12, 1, -15 }, // 0xD3 + { 1973, 10, 16, 12, 1, -15 }, // 0xD4 + { 1993, 10, 16, 12, 1, -15 }, // 0xD5 + { 2013, 10, 16, 12, 1, -15 }, // 0xD6 + { 2033, 7, 7, 9, 1, -6 }, // 0xD7 + { 2040, 10, 13, 12, 1, -12 }, // 0xD8 + { 2057, 8, 16, 12, 2, -15 }, // 0xD9 + { 2073, 8, 16, 12, 2, -15 }, // 0xDA + { 2089, 8, 16, 12, 2, -15 }, // 0xDB + { 2105, 8, 16, 12, 2, -15 }, // 0xDC + { 2121, 11, 16, 11, 0, -15 }, // 0xDD + { 2143, 8, 13, 11, 2, -12 }, // 0xDE + { 2156, 8, 13, 10, 1, -12 }, // 0xDF + { 2169, 7, 13, 10, 1, -12 }, // 0xE0 + { 2181, 7, 13, 10, 1, -12 }, // 0xE1 + { 2193, 7, 13, 10, 1, -12 }, // 0xE2 + { 2205, 7, 13, 10, 1, -12 }, // 0xE3 + { 2217, 7, 13, 10, 1, -12 }, // 0xE4 + { 2229, 7, 14, 10, 1, -13 }, // 0xE5 + { 2242, 13, 10, 15, 1, -9 }, // 0xE6 + { 2259, 7, 14, 9, 1, -9 }, // 0xE7 + { 2272, 7, 13, 9, 1, -12 }, // 0xE8 + { 2284, 7, 13, 9, 1, -12 }, // 0xE9 + { 2296, 7, 13, 9, 1, -12 }, // 0xEA + { 2308, 7, 13, 9, 1, -12 }, // 0xEB + { 2320, 3, 13, 4, 0, -12 }, // 0xEC + { 2325, 2, 13, 4, 1, -12 }, // 0xED + { 2329, 5, 13, 4, -1, -12 }, // 0xEE + { 2338, 4, 13, 4, 0, -12 }, // 0xEF + { 2345, 8, 14, 10, 1, -13 }, // 0xF0 + { 2359, 6, 13, 10, 2, -12 }, // 0xF1 + { 2369, 8, 13, 10, 1, -12 }, // 0xF2 + { 2382, 8, 13, 10, 1, -12 }, // 0xF3 + { 2395, 8, 13, 10, 1, -12 }, // 0xF4 + { 2408, 8, 13, 10, 1, -12 }, // 0xF5 + { 2421, 8, 13, 10, 1, -12 }, // 0xF6 + { 2434, 8, 9, 10, 1, -9 }, // 0xF7 + { 2443, 8, 12, 10, 1, -10 } }; // 0xF8 + +const GFXfont Roboto_Thin9pt8b PROGMEM = { + (uint8_t *)Roboto_Thin9pt8bBitmaps, + (GFXglyph *)Roboto_Thin9pt8bGlyphs, + 0x20, 0xF8, 21 }; + +// Approx. 3981 bytes diff --git a/code/espurna/thermostat.cpp b/code/espurna/thermostat.cpp index 2b8295ff86..4c0dec6327 100644 --- a/code/espurna/thermostat.cpp +++ b/code/espurna/thermostat.cpp @@ -4,6 +4,7 @@ THERMOSTAT MODULE Copyright (C) 2017 by Dmitry Blinov +https://github.com/xoseperez/espurna/pull/1603#issuecomment-469256254 */ #include "thermostat.h" @@ -16,6 +17,17 @@ Copyright (C) 2017 by Dmitry Blinov #include "mqtt.h" #include "ws.h" +#if THERMOSTAT_DISPLAY_SUPPORT +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +#include +#include +#include +#include +#else +#include // alias for `#include "SSD1306Wire.h"` +#endif +#endif + const char* NAME_THERMOSTAT_ENABLED = "thermostatEnabled"; const char* NAME_THERMOSTAT_MODE = "thermostatMode"; const char* NAME_TEMP_RANGE_MIN = "tempRangeMin"; @@ -488,36 +500,69 @@ void resetBurnCounters() { #define wifi_on_width 16 #define wifi_on_height 16 +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +const char wifi_on_bits[] PROGMEM = { + 0x00, 0x00, 0x70, 0x00, 0x7E, 0x00, 0x7F, 0x80, 0x07, 0xC0, 0x01, 0xE0, + 0x40, 0xF0, 0x78, 0x78, 0x7C, 0x38, 0x1E, 0x1C, 0x07, 0x1C, 0x03, 0x8C, + 0x63, 0x8E, 0x71, 0x8E, 0x71, 0xCE, 0x00, 0x00, }; +#else const char wifi_on_bits[] PROGMEM = { 0x00, 0x00, 0x0E, 0x00, 0x7E, 0x00, 0xFE, 0x01, 0xE0, 0x03, 0x80, 0x07, 0x02, 0x0F, 0x1E, 0x1E, 0x3E, 0x1C, 0x78, 0x38, 0xE0, 0x38, 0xC0, 0x31, 0xC6, 0x71, 0x8E, 0x71, 0x8E, 0x73, 0x00, 0x00, }; +#endif #define mqtt_width 16 #define mqtt_height 16 +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +const char mqtt_bits[] PROGMEM = { + 0x00, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x1C, 0x57, 0xFE, 0x57, 0xFE, + 0x00, 0x1C, 0x08, 0x18, 0x18, 0x10, 0x38, 0x00, 0x7F, 0xEA, 0x7F, 0xEA, + 0x38, 0x00, 0x18, 0x00, 0x08, 0x00, 0x00, 0x00, }; +#else const char mqtt_bits[] PROGMEM = { 0x00, 0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x38, 0xEA, 0x7F, 0xEA, 0x7F, 0x00, 0x38, 0x10, 0x18, 0x18, 0x08, 0x1C, 0x00, 0xFE, 0x57, 0xFE, 0x57, 0x1C, 0x00, 0x18, 0x00, 0x10, 0x00, 0x00, 0x00, }; +#endif #define remote_temp_width 16 #define remote_temp_height 16 +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +const char remote_temp_bits[] PROGMEM = { + 0x00, 0x00, 0x07, 0x18, 0x08, 0xA4, 0x08, 0xA4, 0x09, 0x98, 0x0A, 0x80, + 0x0A, 0x80, 0x0B, 0x80, 0x0A, 0x80, 0x0A, 0x80, 0x0B, 0x80, 0x0A, 0x80, + 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00 +}; +#else const char remote_temp_bits[] PROGMEM = { 0x00, 0x00, 0xE0, 0x18, 0x10, 0x25, 0x10, 0x25, 0x90, 0x19, 0x50, 0x01, 0x50, 0x01, 0xD0, 0x01, 0x50, 0x01, 0x50, 0x01, 0xD0, 0x01, 0x50, 0x01, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00, 0x00, }; +#endif #define server_width 16 #define server_height 16 +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +const char server_bits[] PROGMEM = { + 0x00, 0x00, 0x1F, 0xF8, 0x3F, 0xFC, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, + 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x1F, 0xF8, 0x3F, 0xFC, 0x7F, 0xFE, + 0x78, 0x1E, 0x7F, 0xFE, 0x3F, 0xFC, 0x00, 0x00, }; +#else const char server_bits[] PROGMEM = { 0x00, 0x00, 0xF8, 0x1F, 0xFC, 0x3F, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0xF8, 0x1F, 0xFC, 0x3F, 0xFE, 0x7F, 0x1E, 0x78, 0xFE, 0x7F, 0xFC, 0x3F, 0x00, 0x00, }; +#endif #define LOCAL_TEMP_UPDATE_INTERVAL 60000 #define LOCAL_HUM_UPDATE_INTERVAL 61000 -SSD1306 display(0x3c, 1, 3); +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +Adafruit_ST7735 display = Adafruit_ST7735(THERMOSTAT_DISPLAY_ST7735_CS, THERMOSTAT_DISPLAY_ST7735_DC, THERMOSTAT_DISPLAY_ST7735_RST); +#else +SSD1306 display(0x3c, THERMOSTAT_DISPLAY_SSD1306_SDA, THERMOSTAT_DISPLAY_SSD1306_SCL); +#endif unsigned long _local_temp_last_update = 0xFFFF; unsigned long _local_hum_last_update = 0xFFFF; @@ -532,11 +577,22 @@ bool _display_need_refresh = true; bool _temp_range_need_update = true; //------------------------------------------------------------------------------ +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT + +void drawIco(int16_t x, int16_t y, const char *ico, bool on = true) { + display.drawBitmap(x, y, (const uint8_t*) ico, 16, 16, ((on == true) ? ST7735_WHITE : ST77XX_BLACK)); + _display_need_refresh = true; +} + +#else + void drawIco(int16_t x, int16_t y, const char *ico, bool on = true) { - display.drawIco16x16(x, y, ico, !on); + display.drawIco16x16(x, y, ico, !on); //FIXME _display_need_refresh = true; } +#endif + //------------------------------------------------------------------------------ void display_wifi_status(bool on) { _display_wifi_status = on; @@ -562,6 +618,22 @@ void display_remote_temp_status(bool on) { } //------------------------------------------------------------------------------ +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT + +void display_temp_range() { + _temp_range.need_display_update = false; + display.fillRect(68, 0, ST7735_TFTHEIGHT_160 - 60, 16, ST7735_BLACK); + display.setTextColor(ST77XX_WHITE); + display.setTextWrap(true); + display.setCursor(90, 0 + 13); + display.setFont(&Roboto_Thin9pt8b); + String temp_range = String(_temp_range.min) + "\xB0- " + String(_temp_range.max) + "\xB0"; + display.print(temp_range); + _display_need_refresh = true; +} + +#else + void display_temp_range() { _temp_range.need_display_update = false; display.setColor(BLACK); @@ -570,11 +642,34 @@ void display_temp_range() { display.setTextAlignment(TEXT_ALIGN_RIGHT); display.setFont(ArialMT_Plain_16); String temp_range = String(_temp_range.min) + "°- " + String(_temp_range.max) + "°"; - display.drawString(128, 0, temp_range); + display.drawString(128 /*x*/, 0/*y*/, temp_range); _display_need_refresh = true; } +#endif + //------------------------------------------------------------------------------ +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT + +void display_remote_temp() { + _remote_temp.need_display_update = false; + display.fillRect(0, 16, ST7735_TFTHEIGHT_160, 16, ST77XX_BLACK); + + display.setTextColor(ST77XX_WHITE); + display.setTextWrap(true); + display.setFont(&Roboto_Thin9pt8b); + + display.setCursor(0, 16 + 13); + display.print(F("Remote t")); + + display.setCursor(75, 16 + 13); + String temp_range_vol = String("= ") + (_display_remote_temp_status ? String(_remote_temp.temp, 1) : String("?")) + "\xB0"; + display.print(temp_range_vol); + _display_need_refresh = true; +} + +#else + void display_remote_temp() { _remote_temp.need_display_update = false; display.setColor(BLACK); @@ -582,16 +677,35 @@ void display_remote_temp() { display.setColor(WHITE); display.setFont(ArialMT_Plain_16); display.setTextAlignment(TEXT_ALIGN_LEFT); - String temp_range_title = String("Remote t"); - display.drawString(0, 16, temp_range_title); + display.drawString(0, 16, F("Remote t")); String temp_range_vol = String("= ") + (_display_remote_temp_status ? String(_remote_temp.temp, 1) : String("?")) + "°"; display.drawString(75, 16, temp_range_vol); - _display_need_refresh = true; } +#endif //------------------------------------------------------------------------------ +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT + +void display_local_temp() { + display.fillRect(0, 32, ST7735_TFTHEIGHT_160, 16, ST77XX_BLACK); + + display.setTextColor(ST77XX_WHITE); + display.setTextWrap(true); + display.setFont(&Roboto_Thin9pt8b); + + display.setCursor(0, 32 + 13); + display.print(F("Local t")); + + display.setCursor(75, 32 + 13); + String local_temp_vol = String("= ") + (getLocalTemperature() != DBL_MIN ? String(getLocalTemperature(), 1) : String("?")) + "\xB0"; + display.print(local_temp_vol); + _display_need_refresh = true; +} + +#else + void display_local_temp() { display.setColor(BLACK); display.fillRect(0, 32, 128, 16); @@ -599,16 +713,34 @@ void display_local_temp() { display.setFont(ArialMT_Plain_16); display.setTextAlignment(TEXT_ALIGN_LEFT); - String local_temp_title = String("Local t"); - display.drawString(0, 32, local_temp_title); + display.drawString(0, 32, F("Local t")); String local_temp_vol = String("= ") + (getLocalTemperature() != DBL_MIN ? String(getLocalTemperature(), 1) : String("?")) + "°"; display.drawString(75, 32, local_temp_vol); - _display_need_refresh = true; } +#endif //------------------------------------------------------------------------------ +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT + +void display_local_humidity() { + display.fillRect(0, 48, ST7735_TFTHEIGHT_160, 16, ST77XX_BLACK); + + display.setTextColor(ST77XX_WHITE); + display.setTextWrap(true); + + display.setCursor(0, 48 + 13); + display.print(F("Local h ")); + + display.setCursor(75, 48 + 13); + String local_hum_vol = String("= ") + (getLocalHumidity() != DBL_MIN ? String(getLocalHumidity(), 0) : String("?")) + "%"; + display.print(local_hum_vol); + _display_need_refresh = true; +} + +#else + void display_local_humidity() { display.setColor(BLACK); display.fillRect(0, 48, 128, 16); @@ -616,14 +748,13 @@ void display_local_humidity() { display.setFont(ArialMT_Plain_16); display.setTextAlignment(TEXT_ALIGN_LEFT); - String local_hum_title = String("Local h "); - display.drawString(0, 48, local_hum_title); + display.drawString(0, 48, F("Local h ")); String local_hum_vol = String("= ") + (getLocalHumidity() != DBL_MIN ? String(getLocalHumidity(), 0) : String("?")) + "%"; display.drawString(75, 48, local_hum_vol); - _display_need_refresh = true; } +#endif //------------------------------------------------------------------------------ void displayOn() { @@ -644,6 +775,21 @@ void displayOn() { //------------------------------------------------------------------------------ // Setup //------------------------------------------------------------------------------ +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT + +void displaySetup() { + display.initR(INITR_BLACKTAB); // Initialize ST7735R screen + display.setRotation(1); + display.fillScreen(ST77XX_BLACK); + display.cp437(true); + + displayOn(); + + espurnaRegisterLoop(displayLoop); +} + +#else + void displaySetup() { display.init(); display.flipScreenVertically(); @@ -652,6 +798,7 @@ void displaySetup() { espurnaRegisterLoop(displayLoop); } +#endif //------------------------------------------------------------------------------ void displayLoop() { @@ -659,7 +806,11 @@ void displayLoop() { if (_thermostat_display_is_on) { DEBUG_MSG_P(PSTR("[THERMOSTAT] Display Off by timeout\n")); _thermostat_display_is_on = false; +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +//FIXME +#else display.resetDisplay(); +#endif } return; } @@ -731,7 +882,11 @@ void displayLoop() { //------------------------------------------------------------------------------ if (_display_need_refresh) { yield(); +#if THERMOSTAT_DISPLAY_ST7735_SUPPORT +//FIXME +#else display.display(); +#endif _display_need_refresh = false; } } diff --git a/code/espurna/thermostat.h b/code/espurna/thermostat.h index 82bc27651b..bd70e8a1be 100644 --- a/code/espurna/thermostat.h +++ b/code/espurna/thermostat.h @@ -10,13 +10,11 @@ Copyright (C) 2017 by Dmitry Blinov #include "espurna.h" +#if THERMOSTAT_SUPPORT + #include #include -#if THERMOSTAT_DISPLAY_SUPPORT -#include // alias for `#include "SSD1306Wire.h"` -#endif - #define ASK_TEMP_RANGE_INTERVAL_INITIAL 15000 // ask initially once per every 15 seconds #define ASK_TEMP_RANGE_INTERVAL_REGULAR 60000 // ask every minute to be sure #define MILLIS_IN_SEC 1000 @@ -64,3 +62,11 @@ void thermostatModeCooler(bool cooler); bool thermostatModeCooler(); void thermostatSetup(); + +#if THERMOSTAT_DISPLAY_SUPPORT +void displayOn(); +void displaySetup(); +void displayLoop(); +#endif + +#endif diff --git a/code/platformio.ini b/code/platformio.ini index 13581400cf..7c68a5848c 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -154,9 +154,18 @@ lib_deps = https://github.com/pololu/vl53l1x-arduino#1.0.1 https://github.com/mcleng/MAX6675-Library#2.0.1 https://github.com/ThingPulse/esp8266-oled-ssd1306#3398c97 - Adafruit SI1145 Library@~1.1.1 https://github.com/BoschSensortec/BSEC-Arduino-library.git#c5503e0 +display_lib_deps = + Adafruit GFX Library@1.7.5 + Adafruit ST7735 and ST7789 Library@1.5.15 + Adafruit SI1145 Library@~1.1.1 + +display_lib_ignore = + SD + Adafruit ILI9341 + Adafruit seesaw Library + # ------------------------------------------------------------------------------ # COMMON ENVIRONMENT SETTINGS: # ------------------------------------------------------------------------------ diff --git a/code/platformio_override.ini.example b/code/platformio_override.ini.example index dafb0bd345..667bc2feb5 100644 --- a/code/platformio_override.ini.example +++ b/code/platformio_override.ini.example @@ -35,3 +35,23 @@ src_build_flags = -DMY_SONOFF_BUILD01 -DUSE_CUSTOM_H [env:my-sonoff-build02] extends = env:esp8266-1m-latest-base src_build_flags = -DMY_SONOFF_BUILD02 -DUSE_CUSTOM_H + + +# Example for an environment based on 4M byte esp8266 board used as thermostat. +# if you choose the latest environment remember to remove the legacy_lib_deps +# This example add support for DS18B2x on a custom pin, the display support for thermostat and the usage of the ST7735 display model. +# If you remove -DTHERMOSTAT_DISPLAY_ST7735_SUPPORT=1 it will use by defalt SSD1306 display. +# The display used is this one in the photo at the url https://github.com/xoseperez/espurna/pull/2319 + +[env:my-lolin-thermostat] +extends = env:esp8266-4m-base +src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH + -DDALLAS_SUPPORT=1 -DDALLAS_PIN=D3 + -DTHERMOSTAT_SUPPORT=1 -DTHERMOSTAT_DISPLAY_SUPPORT=1 -DTHERMOSTAT_DISPLAY_ST7735_SUPPORT=1 +lib_deps = + ${common.display_lib_deps} + ${common.legacy_lib_deps} + ${common.lib_deps} +lib_ignore = + ${common.display_lib_ignore} +