 
 int logData() {
   String year, month, day, hour, minute, second;
+  power_twi_enable();
+  power_spi_enable();
+
   DateTime datetime = RTC.now();
   year = String(datetime.year(), DEC);
   month = String(datetime.month(), DEC);

  /* The program will continue from here after the WDT timeout*/
  sleep_disable(); /* First thing to do is disable sleep. */

  /* Re-enable the peripherals. */
  power_all_enable();

}

// Send the clear display command (0x76)

    dataFile.println(timeElapsed);
    dataFile.close();
  }
  power_twi_disable();
  power_spi_disable();
}

void setMotorToTurn() {
