   if (!SD.begin(CS_PIN) and !bmp.begin()) {
     Serial.println(F("begin failed"));
     digitalWrite(rLed, HIGH);
-    delay(2000);
+    delay(4000);
     digitalWrite(rLed, LOW);
     return;
   }

#include <SD.h>
#include <Wire.h>                  // BMP085
#include <Adafruit_BMP085.h>       // BMP085
// Base name must be six characters or less for short file names.
#define FILE_BASE_NAME "Data"


const uint8_t CS_PIN = 10; // ChipSelect (MKRZero SD: SDCARD_SS_PIN)
const int gLed =  11;      //
const int rLed = 8;        //
const int LM35 = A0;       // Temperature sensor
Adafruit_BMP085 bmp;

File dataFile;
unsigned long int ttime;
float temp;
float time;

const uint8_t BASE_NAME_SIZE = sizeof(FILE_BASE_NAME) - 1;
char fileName[] = FILE_BASE_NAME "00.csv";

  File dataFile = SD.open(fileName, FILE_WRITE);
  dataFile.print(ttime);
  dataFile.print(",");
  // Record GPS data
  // dataFile.print(",");
  dataFile.print(temp);
  dataFile.print(",");
  dataFile.print(bmp.readTemperature());
  dataFile.print(",");
  dataFile.print(bmp.readPressure());
  dataFile.print(",");
  dataFile.print(bmp.readSealevelPressure());
  dataFile.print(",");
  dataFile.print(bmp.readAltitude(101500));
  // if the current sea level pressure is known, it will
  // vary with weather and such. If it is 1015 millibars
  // that is equal to 101500 Pascals.
  // Altitude is in meters
  dataFile.print(",");

  dataFile.close();

  Serial.print("The Temp is: ");
  Serial.println(temp);
  Serial.print("The time is: ");
  Serial.println(ttime);
  Serial.println("");
}
