 }
 
 void initialize_sd() {
-  if (!sd_card.begin(SD_CS)) {
+  if (!SD.begin(SD_CS)) {
     Serial.println("failed to initialize SD card");
-    while (true); // watchdog will reboot
-  }
-
-  if (!Fat16::init(&sd_card)) {
-    Serial.println("failed to initialize FAT 16");
     while (true); // watchdog will reboot
   }
 }


  uint32_t current_time = rtc.now().unixtime();
  uint32_t last_reading_time = get_last_reading_time();
  
  Serial.print("time since last reading: ");
  Serial.print(current_time - last_reading_time);
  Serial.print(", current_time: ");
  Serial.print(current_time);
  Serial.print(", last_reading_time: ");


// Select one of the following:

#define TRANSMITTER_WIFI
//#define TRANSMITTER_GSM

// =============================================

#include <Wire.h>
#include "RTClib.h"
#include "DHT.h"
#include <SD.h>

#ifdef TRANSMITTER_WIFI
  #include <libmaple/iwdg.h>
