   
   // if the file opened okay, write to it:
   if (myFile) {
+    #ifdef SERIAL_OUTPUT
     // Serial info
     Serial.print("Writing ");
     Serial.print(value);
     Serial.print(" to ");
     Serial.print(filename);
     Serial.print("... ");
+    #endif
     
     // Write value to file and close
     myFile.println(value);
     myFile.close();
     
+    #ifdef SERIAL_OUTPUT
     Serial.println("done.");
+    #endif
   } else {
     // if the file didn't open, print an error:
+    #ifdef SERIAL_OUTPUT
     Serial.println("error opening for writing.");
+    #endif
   }
 }
 

    Serial.println("error opening for reading");
  }
}

// Append float value to file
void logToFile(char* filename, float value)


void setup()
{
  #ifdef SERIAL_OUTPUT
  Serial.begin(9600);
  #endif

  // Initialize the lcd with backlight on
  lcd.init();
