Add Loading splash

This commit is contained in:
Alexander Popov 2024-01-28 01:30:25 +03:00
parent cb9fa0cffe
commit cada05fe4a
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
1 changed files with 14 additions and 6 deletions

View File

@ -10,6 +10,12 @@ static const unsigned char PROGMEM image_devil[] = {
0xe3, 0xf1, 0xc0, 0xe1, 0xe1, 0xc0, 0xf1, 0xe3, 0xc0, 0xff, 0xff,
0xc0, 0x7f, 0xff, 0x80, 0x7b, 0xf7, 0x80, 0x3d, 0x2f, 0x00, 0x1e,
0x1e, 0x00, 0x0f, 0xfc, 0x00, 0x03, 0xf0, 0x00};
static const unsigned char PROGMEM image_loading[] = {
0x03, 0xf0, 0x00, 0x0f, 0xfc, 0x00, 0x1f, 0xfe, 0x00, 0x38, 0x07,
0x00, 0x7d, 0xef, 0x80, 0x7d, 0xef, 0x80, 0xfd, 0xef, 0xc0, 0xfe,
0xdf, 0xc0, 0xff, 0x3f, 0xc0, 0xff, 0x3f, 0xc0, 0xfe, 0x9f, 0xc0,
0xfd, 0x4f, 0xc0, 0x7c, 0xaf, 0x80, 0x7d, 0x4f, 0x80, 0x38, 0x07,
0x00, 0x1f, 0xfe, 0x00, 0x0f, 0xfc, 0x00, 0x03, 0xf0, 0x00};
Adafruit_SSD1306 display(128, 64, &Wire, 4);
@ -20,18 +26,21 @@ void setup() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(1, 2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(30, 10);
display.println("Loading");
display.setTextSize(1);
display.setCursor(39, 26);
display.setTextWrap(false);
display.print("Loading...");
display.drawBitmap(16, 21, image_loading, 18, 18, 1);
display.display();
// delay(200);
display.clearDisplay();
delay(1000);
}
void loop() {
display.clearDisplay();
display.setTextColor(SSD1306_WHITE);
display.drawRect(0, 0, 128, 51, 1);
display.drawRect(0, 50, 128, 14, 1);
@ -39,7 +48,6 @@ void loop() {
display.drawBitmap(6, 24, image_devil, 18, 21, 1);
display.drawBitmap(5, 53, image_window, 9, 8, 1);
display.setTextColor(1);
display.setTextSize(1);
display.setCursor(17, 53);
display.setTextWrap(false);