added splash screen

This commit is contained in:
--global
2023-04-28 18:06:39 +03:00
parent 64e7fbf5bf
commit a27787174f

View File

@ -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();