           month(epoch), day(epoch), year(epoch),
           hour(epoch), minute(epoch), second(epoch));
 }
-
-void open_file(void) {
-  char filename[] = "log_****-11-11_12:59:59.csv";
-
-  sprintf(filename, "log_%4d-%02d-%02d_%02d:%02d:%02d.csv",
-          year(), month(), day(), hour(), minute(), second());
-
-  logfile = SD.open(filename, FILE_WRITE);
-}

  pinMode(greenLed, OUTPUT);
  pinMode(yellowLed, OUTPUT);

  //Initialize serial and wait for port to open:
  flash_3leds(redLed, greenLed, yellowLed, 5, 100);
  flash_3leds(redLed, greenLed, yellowLed, 5, 400);

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {

    digitalWrite(yellowLed, HIGH);
    connect_to_server();
    digitalWrite(yellowLed, LOW);
  }

  if(canConnect) {
