   // Set call to update files every minute
   Alarm.timerRepeat(60, buttonInterrupt);
 
-  // Update LCD screenevery second (avoid SPI collision)
-  // Alarm.timerRepeat(1, triggerLCD);
+  // Update LCD screenevery second
+  Alarm.timerRepeat(1, triggerLCD);
 
   // Done
   lcd.setCursor(0,1);
   lcd.print("Initialized.");
-  delay(500);
+  Alarm.delay(500);
   lcd.clear();
 }
 

    Serial.println("T_out.txt: ");
    readFileToSerial("T_out.txt");
  }
  trigger_button = false;

}

boolean trigger_lcd = false;

// void updateLCD()
// {
//   sprintf(lcd_line_buffer, "%2d/%02d %02d:%02d:%02d", 
//     month(), day(), hour(), minute(), second());
//   // lcd.clear();
//   lcd.setCursor(0,0);
//   lcd.print(lcd_line_buffer);

//   sprintf(lcd_line_buffer, "IN: %2d, OUT: %3d", 
//     tempA, tempB);
//   lcd.setCursor(0,1);
//   lcd.print(lcd_line_buffer);

//   // LCD refreshed, clear update bit
//   trigger_lcd = false;
// }


void triggerLCD()


void updateTemperatures()
{
  // tempA = thermistorA.getReading();
  // tempB = thermistorB.getReading();
  tempA = thermistorA.getFilteredReading();
  tempB = thermistorB.getFilteredReading();
}

// Read and record data to log files
void recordData()
{
  Alarm.delay(250);
  Serial.println("Woo");
  if (startSD())
  {
    SDCardExists = true;
    // Read thermistors
    updateTemperatures();

