void setup()
{
pinMode(9,OUTPUT); // LED output
pinMode(6,INPUT); // Button input
//... rest of the calculations and oled code...
}
void loop() {
calculateYMD();
while (digitalRead(6) == HIGH) // sit here as long as the switch is LOW
;
digitalWrite(9, LOW);
display.setCursor(0, 0);
display.print(Y); display.print(" God");
display.setCursor(68, 0);
display.print(M); display.print(" Mj");
display.setCursor(25, 18);
display.print(D); display.print(" Dana");
display.display();
delay(5000);
digitalWrite(9, HIGH);
display.clearDisplay();
display.display();
// AND don't you need a display.display() call here?
}