OLED random dotting; need help on how to set startup

Hello,

Fairly new to arduino but quite good with electronics. I’ve made what is basically a random number generator using an arduino nano and this OLED - https://www.amazon.co.uk/gp/product/B07FCFVXZ8/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1

The circuit itself works and the arduino functions as intended but on start up the screen is filled with randomised dots until the button is pressed. Anyone know how to program a sort of start up image?

Heres the code i’ve been using ;

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <TrueRandom.h>

Adafruit_SSD1306 display(4); // create display object
const int buttonPin = 2; // the number of the button pin

void setup() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // setup the OLED
pinMode(buttonPin, INPUT); // setup button
}

void loop() {
if(digitalRead(buttonPin) == HIGH) {
delay(10);
if(digitalRead(buttonPin) == HIGH) {
display.fillScreen(BLACK); // erase the whole display
display.setTextSize(3);
display.setTextColor(WHITE);

int roll = TrueRandom.random(1, 21); // store the random number
if (roll < 10) {
// single character number
display.setCursor(58, 4);
display.println(roll); // write the roll
drawDie(); // draw the outline
}
else {
// dual character number
display.setCursor(48, 4);
display.println(roll); // write the roll
drawDie(); // draw the outline
}

display.display(); // write to display
delay(50);
}
}
}

void drawDie() {
display.drawRect((display.width() - 80) / 2, 0, 85, 30, WHITE);
}

and here is a collection of pictures. https://imgur.com/a/Cg7un5P

Cheers!

Anyone know how to program a sort of start up image?

If all you want to do is clear up the random pixels, copy the code that is executed, in loop(), after the switch is pressed, to setup().

              display.fillScreen(BLACK); // erase the whole display

Sweet, thank you. I've done that for now. To display something such as a logo how would I go about inserting the code for it?

To display something such as a logo how would I go about inserting the code for it?

With a text editor.

There is not a drawLogoSomehowWithNoUserInputButBeSureTheLogoIsWhatTheUserExpects() method in the library.

I understand the text editor but needed to know what else was needed in the code for it to display, such as the whole line of code

Still stuck on this guys. Random pixels still exist and i'm unsure where to place code to cause the black screen

and i'm unsure where to place code to cause the black screen

Do you know WHAT code to place somewhere?

              display.fillScreen(BLACK); // erase the whole display

If you do that in setup(), what happens? What happens if you change BLACK to GREEN or PINKPOLKADOTTED?