   }
   delay(1000);
   
-  //TODO return the temperature value from this function
-  return temperature;
+  char temp[10];
+  dtostrf(temperature, 2, 2, temp);
+  return temp;
 }
 
 void connectToWifi() {


void loop() {
  Serial.println("DEBUG :: loop()");
  float tempVar = readTemperature();
  float humVar = getDHT11HumidityReadings();
  char temp[10];
  char humidity[10];
  dtostrf(tempVar, 2, 2, temp);
  dtostrf(humVar, 2, 2, humidity);
  Serial.print("DEBUG :: Temp value return is : ");
  Serial.println(temp);
  Serial.print("DEBUG :: Humidity value return is : ");
  Serial.println(humidity);
  publishTempHumMsg(temp, humidity);
  // MQTT client loop processing
  client.loop();
}

void checkTiltState() {
  tiltState = digitalRead(tiltSensorPin);
  Serial.print("INFO :: [1 -> On, 0 -> Off] :: Tilt State is : ");
  Serial.println(tiltState);
  if (tiltState != previousTiltState) {
    previousTiltState = tiltState;
    String tiltMsg = getSensorId();
    tiltMsg.concat(",");
    tiltMsg.concat(tiltState);
//    tiltMsg.concat(",");
//    tiltMsg.concat(time);
    char message_buff[30];
    tiltMsg.toCharArray(message_buff, tiltMsg.length()+1);
    //send tilt state to the tilt queue
    client.publish("arduino-tilt-exchange", message_buff);
  }
  
}

void connectToMQTT() {

void callback(char* topic, byte* payload, unsigned int length) {
}


void printWifiData() {
  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("DEBUG :: IP Address: ");
  Serial.println(ip);
  // print MAC address:
  byte mac[6];
  WiFi.macAddress(mac);
  Serial.print("DEBUG :: MAC address: ");
  Serial.print(mac[5], HEX);
  Serial.print(":");
  Serial.print(mac[4], HEX);
  Serial.print(":");
  Serial.print(mac[3], HEX);
  Serial.print(":");
  Serial.print(mac[2], HEX);
  Serial.print(":");
  Serial.print(mac[1], HEX);
  Serial.print(":");
  Serial.println(mac[0], HEX);
    // print the SSID of the network you're attached to:
  Serial.print("DEBUG :: SSID: ");
  Serial.println(WiFi.SSID());
  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("DEBUG :: Signal strength (RSSI):");
  Serial.println(rssi);
  // print the encryption type:
  byte encryption = WiFi.encryptionType();
  Serial.print("DEBUG :: Encryption Type:");
  Serial.println(encryption, HEX);
}


