 void setup() {
   Serial.begin(SERIAL_BAUD_RATE);
   wifiSerial.begin(WIFI_BAUD_RATE);
-  gpsSerial.begin(GPS_BAUD_RATE);  // gps begins after wifi because it is used first
 
   pinMode(10, OUTPUT);
   Serial.println("Start");
   start_file();
   Serial.println("File started");
   delay(DELAY_TIME);
+
 }
 
 void loop() {
-#if DEBUG
-  print_debug(2); //Asking for WiFi
-#endif
-  Serial.println(__LINE__);
+  unsigned long t_start = millis();
   send_data();
-}
+  unsigned long t_end = millis();
+  float elapsed = (t_end - t_start)/1000.0;
+  Serial.println("Elapsed seconds = " + String(elapsed));
+  float throughput = float(filesize)/elapsed;
+  Serial.println("Throughput = " + String(throughput));
+}
#define WIFI_RX 5
#define WIFI_BAUD_RATE 38400

#define DHT11_PIN 7
#define DHTPIN 7
#define DHTTYPE DHT11



#define request "?"
#define clear_to_send ":"
#define end_of_file "#"
#define wifi_freq 10
#define wifi_timeout 20

#define SEPARATOR ","

#define DELAY_TIME 150

#define PIN_LIGHT A3
#define SD_CHIP_SELECT 10
#define PIN_RAIN A1


const char string_0[] PROGMEM = "log.txt";
const char string_1[] PROGMEM = "node_id=";

  
  while (data_file.available()) {
    if(!start_connection()){
      break;
    }
    String a;
    int i = 0;  
    start_message();
    while (data_file.available() and i < BATCH_SIZE) {      
      i++;
      a = data_file.readStringUntil('\n');
      wifiSerial.print(a + "\n");
