   Serial.println();
 
   init_lcd();
-  lcd.print("Init v2");
-
+  lcd.print("Init v3");
+
+  init_wifi();
   // Start the DHT22
-
+  publishDebug("WiFi On");
+  publishDebug("Initialising Sensors");
   dht.begin();
   Serial.println("sensor is starting..");
   Serial.print("Reading Analog...");
   Serial.println(analogRead(0));
-
-  init_wifi();
+  publishDebug("Initialising Timers");
   initTimers();
 //----------------- wifi_set_sleep_type(LIGHT_SLEEP_T);
 //----------------- gpio_pin_wakeup_enable(GPIO_ID_PIN(2),GPIO_PIN_INTR_HILEVEL);

  lcd.print(firstLine);
  lcd.setCursor(0,1);
  lcd.print(secondLine);
}

void debugDisplayPayload() {


char server[] = IOT_ORG IOT_BASE_URL;
char topic[] = "iot-2/evt/status/fmt/json";
char debugTopic[] = "iot-2/evt/status/fmt/debug";
char authMethod[] = "use-token-auth";
char token[] = IOT_TOKEN;
char clientId[] = "d:" IOT_ORG ":" IOT_DEVICE_TYPE ":" IOT_DEVICE_ID;
