From a27787174f64a3203f5347eb22ae3bf42b9c0ccd Mon Sep 17 00:00:00 2001 From: --global <--global> Date: Fri, 28 Apr 2023 18:06:39 +0300 Subject: [PATCH] added splash screen --- software/GToE/GToE.ino | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/software/GToE/GToE.ino b/software/GToE/GToE.ino index bca387f..0ab5d5a 100644 --- a/software/GToE/GToE.ino +++ b/software/GToE/GToE.ino @@ -74,6 +74,22 @@ bool encPressRegistered; Adafruit_SSD1306 display(128, 64, &Wire, -1); RotaryEncoder encoder(ENC_D1_PIN, ENC_D2_PIN, RotaryEncoder::LatchMode::TWO03); +const unsigned char splash_logo [] PROGMEM = { + 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x01, 0xff, 0xff, 0xc0, 0x00, 0x03, + 0xfc, 0x1f, 0xe0, 0x00, 0x07, 0xe0, 0x03, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0xf8, 0x00, 0x1f, 0x00, + 0x00, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, + 0x1e, 0x00, 0x78, 0x0c, 0x18, 0x0f, 0x00, 0x78, 0x1e, 0x3c, 0x0f, 0x00, 0x70, 0x1e, 0x3c, 0x07, + 0x00, 0xf0, 0x1e, 0x3c, 0x07, 0x80, 0xf0, 0x1e, 0x3c, 0x07, 0x80, 0xf0, 0x1e, 0x3c, 0x07, 0x80, + 0xf0, 0x1e, 0x3c, 0x07, 0x80, 0xf0, 0x0c, 0x18, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x18, 0x10, 0x00, 0x0f, 0x1e, 0x3c, 0x78, 0x00, 0x0f, 0x1e, + 0x3c, 0x78, 0x00, 0x1e, 0x0c, 0x18, 0x3c, 0x00, 0x1e, 0x00, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x00, + 0x1e, 0x00, 0x3c, 0x00, 0x00, 0x1e, 0x00, 0x78, 0x00, 0x00, 0x0f, 0x00, 0x78, 0x00, 0x00, 0x0f, + 0x00, 0xf0, 0x00, 0x00, 0x07, 0x80, 0xf0, 0x00, 0x00, 0x07, 0x80, 0xf0, 0x00, 0x00, 0x07, 0x80, + 0x78, 0x00, 0x00, 0x0f, 0x00, 0x7c, 0x00, 0x00, 0x1f, 0x00, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x3f, + 0xff, 0xff, 0xfe, 0x00, 0x1f, 0xff, 0xff, 0xfc, 0x00, 0x07, 0xff, 0xff, 0xf0, 0x00, 0x01, 0xff, + 0xff, 0xc0, 0x00 +}; + void setup() { Serial.begin(9600); @@ -98,6 +114,16 @@ void setup() { display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS); + //Splash screen + display.clearDisplay(); + display.drawBitmap(48, 18, splash_logo, 33, 39, 1); + display.setCursor(90,1); + display.setTextSize(1); + display.setTextColor(SSD1306_WHITE); + display.println(F("V:0.1a")); //Version + display.display(); + delay(2000); + updateScreen(); updateTiming();