     Serial.print(" %, Temp: ");
     Serial.print(temp);
     Serial.print(" *C\n");
+  }
+
+  // Display temperature.
+  displayTemp(temp);
 }
 

float hum;  // Humidity
float temp; // Temperature

void setup()
{
    Serial.begin(9600);
    dht.begin();
}

void loop()
{
    // Wait a few seconds between measurements.
    delay(2000);
    
    // Read data and store it to variables hum and temp.
    hum = dht.readHumidity();
    temp= dht.readTemperature();

#include <DHT.h>

// Constants
#define DHTPIN  2         // Temperature Sense pin
#define DHTTYPE DHT11     // DHT 11
DHT dht(DHTPIN, DHTTYPE); // Initialize DHT Sensor

