 #include <TimeLib.h>
 #include <WiFiUdp.h>
 
-#include "persistent_vector.h"
+#include "persistent_queue.h"
 #include "ssid-info.h"
 #include "util.h"
 
-PrintEx serial = Serial;
+static constexpr char const* SENSOR_ID = "bostonfern1";
+static constexpr unsigned ENABLE_SENSOR_PIN = 14;
 
 static constexpr unsigned CONNECTION_TIMEOUT = 5000;
 static constexpr char const* HOST = "192.168.1.2";

}

void loop() {
  message msg;
  msg.time = now();
  for (unsigned short i = 0; i < SAMPLES_PER_MESSAGE; i++)
    msg.samples[i] = i;

  pending_messages->push_back(msg);

  send_messages();

  Serial.println("Storing data to EEPROM");
  EEPROM.commit();

  ESP.deepSleep(SLEEP_TIME);
  Serial.println(">>> This should not print");
}

static void connect_wifi() {  

  serial.printf("Address: %s\n", WiFi.localIP().toString().c_str());
}

static void delete_messages() {
  auto size = pending_messages_queue::storage_size(MAX_PENDING_MESSAGES);
  for (size_t i = 0; i < size; i++)
