     dataFile.println(timeElapsed);
     dataFile.close();
   }
+  power_twi_disable();
+  power_spi_disable();
 }
 
 void setMotorToTurn() {


void enterSleep()
{
  sleep_enable();

  attachInterrupt(0, pinInterrupt, RISING);


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);
