 #include <dht11.h>
 
 
+#include <SPI.h>
+#include <SD.h>
+
+
 #define DHT11_PIN 3 
 
 dht11 DHT11;
+const int chipSelect = 10;
+File dataFile;
 
 
 void setup() {

    }

    buffer[16] = '\0' ;
    micro_delay(200);
    Serial.println(buffer);
}

// param n is to ensure n*10 ms delay

        char error[] = "clock error" ;
        Serial.println(error);
        for(;;);
    }

    // initialize SD card
    pinMode(SS, OUTPUT);
        if (!SD.begin(chipSelect)) {
        Serial.println("Card failed, or not present");
        // don't do anything more:
        while (1) ;
    }

    dataFile = SD.open("yuktix.dat", FILE_WRITE);
    if (! dataFile) {
        Serial.println("error opening yuktix.dat");
        // Wait forever since we cant write data
        while (1) ;
    }

    Alarm.timerRepeat(10, log_data);
