You forgot to initialize an instance for your DHT sensor: see how I inserted the line 'DHT dht(DHTPIN, DHTTYPE); '^above in the excerpt of your code