   pinMode(CS_PIN, OUTPUT);
   Serial.begin(9600);
 
-  if (!SD.begin(CS_PIN)) {
+  if (!SD.begin(CS_PIN) and !bmp.begin()) {
     Serial.println(F("begin failed"));
     digitalWrite(rLed, HIGH);
     delay(2000);

      return;
    }
  }
  dataFfile = SD.open(fileName, FILE_WRITE);
  if (!dataFile) {
    // Blink 3 times faster
    Serial.println("open failed");

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