Button to tell time

  1. Ye. I had changed it and the program went crazy on me so I had to shut down the program before I could save it.

It's changed now.Serial.println("press the button and we will tell you the time.");}

  1. I am not sure what you mean when you say that the pinMode() is in the 'if' statement. It looks like it is in the void setup () curly bracket.
void setup () 
{
    Serial.begin(57600);
    Wire.begin();
    RTC.begin();
     pinMode(buttonPin, INPUT);
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));

   }
 
}
  1. With regards to the wiring: I think that might be the problem as well. See attached picture. Hope it's clear enough.