   }
   
   // calc days left
-  d = dMax - days;
+  int d = dMax - days;
+  strTime = getClockTime(d);
   
-  // calc seconds left
-  s = seconds;
+  if (d < 0) {
+    // timer done
+    myTimer.disable(timerId);
+    myTimer.disable(timerId2);
+    myTimer.disable(timerId3);
+    onTimerEnd();
+  }
+  else {
+    mySerial.write(22);                   // no cursor
+    mySerial.write(12);                   // clear
+    mySerial.println(strTitle);           // first line, display title
+    mySerial.write(148);                  // new line
+    
+    int spaceCount = 16 - strTime.length() - 2;
+    String strSpace = "";
+    for (int i = 0; i < spaceCount; i++) {
+      strSpace += " ";
+    }
+    
+    strLine2 = strTime + strSpace + "PK";
+    
+    mySerial.print(strLine2);      // second line, display time and initials
+    Serial.println("Time: " + strTime);   // console debug
+  }
+}
+
+void flashLED() {
+  int ledState = digitalRead(onBoardLEDPin);
+  if (ledState == HIGH) {
+    digitalWrite(onBoardLEDPin, LOW);
+  }
+  else if (ledState == LOW) {
+    digitalWrite(onBoardLEDPin, HIGH);
+  }
+}
+
+void updateTitle() {
+  strTitle = strTitle.charAt(strTitle.length() - 1) + strTitle.substring(0, strTitle.length() - 1);
   
-  if (d < 0)
-  {
-    // timer done
-    return "done";
+  mySerial.write(22);                   // no cursor
+  mySerial.write(12);                   // clear
+  mySerial.println(strTitle);           // first line, display title
+  mySerial.write(148);                  // new line
+  
+  int spaceCount = 16 - strTime.length() - 2;
+  String strSpace = "";
+  for (int i = 0; i < spaceCount; i++) {
+    strSpace += " ";
   }
   
+  strLine2 = strTime + strSpace + "PK";
+  
+  mySerial.print(strLine2);      // second line, display time and initials
+  Serial.println("Time: " + strTime);   // console debug
+}
+
+// Get time left in DD:HH:MM:SS format.
+String getClockTime(int daysLeft) {
+  // calc seconds left
+  double s = seconds;
+  
   // calc minutes left
-  m = (int)(s / 60);
+  int m = (int)(s / 60);
   s -= m * 60;
   
   // calc hours left
-  h = (int)(m / 60);
+  int h = (int)(m / 60);
   m -= h * 60;
   
   // format DD:HH:MM:SS
-  String strD = printDigits(d, true);
+  String strD = printDigits(daysLeft, true);
   String strH = printDigits(h, true);
   String strM = printDigits(m, true);
   String strS = printDigits((int)s, false);

// objects
SoftwareSerial mySerial = SoftwareSerial(255, lcdPin);
SimpleTimer myTimer;
int timerId;                                  // reference to clock timer

// Configure display and timer.
void setup() {
  pinMode(lcdPin, OUTPUT);                           // set lcdPin as output to LCD
  mySerial.begin(9600);                              // start serial
  timerId = myTimer.setInterval(1000, modifyClock);  // update clock every 1 sec
  setupTime();                                       // setup time left
  delay(100);
}

// Run the timer.


// Modify clock display.
void modifyClock() {
  double s;
  
  seconds--;  //update seconds
