   { PIStates[i] = digitalRead(PHOTO_INTERRUPTER_PINS[i]); lastStates[i] = PIStates[i]; }
 }
 
+//saving data to SD card:
 void logData() {
   power_twi_enable();
   power_spi_enable();

  return true;
}

void enterSleep()
{
  Serial.println(F("Going to sleep.")); delay(50);

  if (dataFile) {
    Serial.println(F("File successfully written..."));
    Serial.println(time);
    
    //printing to SD card (each comma tells the excel doc to go to the next cell to the right)**
    dataFile.print(time);
    dataFile.print(",");
    dataFile.print(pelletCount[0]);
