     {
         Debugger::DebugMessage("MQTT Failed: " + readingType);
     }
-}
-
-//
-//  Read the sensors and publish the data.
-//
-void ReadAndPublishSensorData()
-{
-    digitalWrite(PIN_ONBOARD_LED, HIGH);
-    Debugger::DebugMessage("Reading sensor data.");
-    _sensors->ReadAllSensors();
-    Debugger::LogLuminosityData(_sensors->GetLuminosityReading());
-    Debugger::LogTemperatureHumidityAndPressureData(_sensors->GetAirTemperature(), _sensors->GetHumidity(), _sensors->GetAirPressure());
-    //Debugger::LogUltravioletData(_sensors->GetUltravioletLightStrength());
-    Debugger::LogGroundTemperature(_sensors->GetGroundTemperatureReading());
-    Debugger::LogRainfall(0, _pluviometerCountToday * 0.2794);
-    //
-    String message;
-    char buffer[20];
-    message = "Wind speed pulse count: ";
-    message += itoa(_lastFiveSecondWindSpeedCount, buffer, 10);
-    Debugger::DebugMessage(message);
-    //
-    message = "Wind speed: ";
-    message += Debugger::FloatToAscii(buffer, (_lastFiveSecondWindSpeedCount * 1.492) / 5, 2);
-    message += "mph";
-    Debugger::DebugMessage(message);
-    //
-    //  Now post to the Internet.
-    //
-    //Debugger::DebugMessage("Posting to Internet.");
-    //MQTT_connect();
-    //CheckMQTTLoggingResult(_airPressureFeed.publish(_sensors->GetAirPressure() / 100), "Air Pressure");
-    //CheckMQTTLoggingResult(_airTemperatureFeed.publish(_sensors->GetAirTemperature()), "Air Temperature");
-    //CheckMQTTLoggingResult(_daylightFeed.publish(_sensors->GetLuminosityReading()), "Daylight");
-    //CheckMQTTLoggingResult(_groundTemperatureFeed.publish(_sensors->GetGroundTemperatureReading()), "Ground Temperature");
-    //CheckMQTTLoggingResult(_humidityFeed.publish(_sensors->GetHumidity()), "Humidity");
-    //CheckMQTTLoggingResult(_rainFallFeed.publish(_sensors->GetTotalRainfallToday()), "Rainfall");
-    //CheckMQTTLoggingResult(_uvLightFeed.publish(_sensors->GetUltravioletLightStrength()), "Ultraviolet Light");
-    //CheckMQTTLoggingResult(_windSpeedFeed.publish(_sensors->GetWindSpeed()), "Wind Speed");
-    //CheckMQTTLoggingResult(_windDirectionFeed.publish(_sensors->GetWindDirectionAsString()), "Wind Direction");
-    //Debugger::DebugMessage("Posting complete'");
-    digitalWrite(PIN_ONBOARD_LED, LOW);
 }
 
 //

Ticker _fiveSecondTicker;

//
//  DS3234 real time clock object.
//
DS3231 *rtc;

    //
    SetAlarm(rtc, 1);
    //
    //  Indicate that the sensors should be read.
    //
    _readSensors = true;
}

//
