Ordered on weekdays before 14:00 = shipped the same day and delivered the next day in 98% of cases. Free returns 30-day reflection period 1-year warranty

Wiring diagram and code example

How to connect the Temperature and humidity sensor in one | DHT22 module for breadboard to an Arduino UNO or ESP32, with an example sketch you can upload straight away.

DHT22 Temperature and Humidity Monitor

This project reads ambient temperature and relative humidity using a DHT22 sensor and an Arduino Uno. The readings are refreshed every two seconds and displayed on the Serial Monitor. It provides a simple and reliable way to verify your sensor is working correctly.

Wiring diagram: Temperature and humidity sensor in one | DHT22 module for breadboard on an Arduino UNO
Wiring diagram · Click to enlarge
Connection table: Temperature and humidity sensor in one | DHT22 module for breadboard on an Arduino UNO
Connection table · Click to enlarge
DHT22_Temperature_and_Humidity_Monitor.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : DHT22 Temperature and Humidity Monitor
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : DHT22
 *  Libraries : DHT sensor library 1.4.7
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include "DHT.h"

#define DHTPIN 2
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(115200);
  Serial.println(F("DHT22 Reading Demo"));
  dht.begin();
}

void loop() {
  // DHT22 sampling rate is roughly once every 2 seconds
  delay(2000);

  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  if (isnan(humidity) || isnan(temperature)) {
    Serial.println(F("Failed to read from DHT sensor!"));
    return;
  }

  Serial.print(F("Humidity: "));
  Serial.print(humidity, 1);
  Serial.print(F("%  |  Temperature: "));
  Serial.print(temperature, 1);
  Serial.println(F("°C"));
}

Required libraries: DHT sensor library 1.4.7

Wiring diagram and example code generated by Codey.online — https://www.codey.online

DHT22 Temperature and Humidity Monitor

This project reads temperature and humidity data from a DHT22 sensor using an ESP32. Power is supplied at 3.3V to ensure safe logic levels for the ESP32. Open the Serial Monitor at 115200 baud to view continuous real-time environmental measurements every two seconds.

Wiring diagram: Temperature and humidity sensor in one | DHT22 module for breadboard on an ESP32 DevKit V1
Wiring diagram · Click to enlarge
Connection table: Temperature and humidity sensor in one | DHT22 module for breadboard on an ESP32 DevKit V1
Connection table · Click to enlarge
DHT22_Temperature_and_Humidity_Monitor.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : DHT22 Temperature and Humidity Monitor
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : DHT22
 *  Libraries : DHT sensor library 1.4.7
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include "DHT.h"

#define DHTPIN 4
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(115200);
  Serial.println("DHT22 Sensor Reading Test");
  
  dht.begin();
}

void loop() {
  // Wait 2 seconds between measurements (DHT22 sampling rate is ~0.5Hz)
  delay(2000);

  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  // Check if any reads failed and exit early
  if (isnan(humidity) || isnan(temperature)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Serial.print("Humidity: ");
  Serial.print(humidity, 1);
  Serial.print(" %  |  Temperature: ");
  Serial.print(temperature, 1);
  Serial.println(" °C");
}

Required libraries: DHT sensor library 1.4.7

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Temperature and humidity sensor in one | DHT22 module for breadboard

This is the big brother of the DHT11 and much more accurate. The sensor measures both temperature and humidity.

Module for breadboard or easy connection of Dupont cables (included)

Temperature measurement range is -40 to +80 degrees Celsius.

Accuracy of +/- 0.5 degrees

Power supply: 3.3v to 6v

Humidity range: 0-100% RH.
Humidity accuracy: ±2.0% RH.
Response time: < 3 sec.

Incl: Dupont cables Female-Female

Dimensions
Length: 4.35cm
Width: 1.53cm
Height: 0.97cm

  • Temperature measurement
  • Humidity
  • 4,35 x 1,53 x 0,97 cm
  • Suitable for breadboard

Why choose this product?

  • High accuracy – Temperature and humidity are measured accurately.
  • Wide measurement range – Measures from -40 to +80 °C and 0-100% RH.
  • Fast response – Response time is less than 3 seconds.
  • Easy to connect – For breadboard use, with included Dupont cables.
Specifications
Power supply3.3V to 6V
Width1,53 cm
Suitable forbreadboard
Temperature range-40 to +80 °C
Length4,35 cm
Height0,97 cm
Temperature accuracy± 0.5 °C
Humidity range0-100% RH
Humidity accuracy±2,0% RH
Response time< 3 sec

In the package

  • DHT22 module
  • Dupont cables Female-Female

Frequently bought together

Total: € 22,45

Reviews

★★★★★ 5,0/5 1 review
  • ★★★★★Hans FreudenborgVerified purchase

    Accurate.

Write a review
Your rating

Shipping & returns

Shipping

  • Parcel with track & trace€ 7,70Within 24 hours
  • Pick up at PostNL location€ 7,40Within 24 hours
  • Letterbox parcel€ 3,70Within 2 business days
  • Letterbox parcel 24 hours€ 4,55Within 24 hours
  • Pick up in storeFree
All about shipping

Returns

Not satisfied? You have 30 days after delivery to return the product.

All about returns

Recently viewed

18650 double battery holder

18650 double battery holder

€ 1,00