 #endif
 
 #ifdef TRANSMITTER_GSM
-//  SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
-//  SoftwareSerial *fonaSerial = &fonaSS;
-
-//  Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
+  SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
+  SoftwareSerial *fonaSerial = &fonaSS;
+
+  Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
+  bool gsmConnected = false;
 #endif
-
 
 void setup() {
   watchdog_init();

  pinMode(DHT_GND, OUTPUT);
  digitalWrite(DHT_VCC, HIGH);
  digitalWrite(DHT_GND, LOW);
  
  if (!SD.begin(SD_CS)) {
    Serial.println("failed to initialize SD card");
    while (true); // watchdog will reboot
  }

  initialize_rtc();

//  dht.begin();
  
  watchdog_feed();
}


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

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

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