Last Call! We pause shipping on Feb 14th. Order NOW to get your gear shipped before the holiday!

Figure 1 – Installing the DHT22 library for the ESP32.

Figure 2 – Electric diagram to connect the ESP32 and the DHT22.
#include "DHTesp.h"
DHTesp dht;
Serial.begin(115200);
dht.setup(27);
float temperature = dht.getTemperature();
Serial.print("Temperature: ");
Serial.println(temperature);
delay(10000);
#include "DHTesp.h"
DHTesp dht;
void setup()
{
Serial.begin(115200);
dht.setup(27);
}
void loop()
{
float temperature = dht.getTemperature();
Serial.print("Temperature: ");
Serial.println(temperature);
delay(10000);
}
