Accurate temperatuur- en luchtvochtigheidssensor voor breadboards en eenvoudige aansluiting met Dupont-kabeltjes.
SKU: OT729-D67 Número do artigo: AB060 EAN: 4312640130235 Localização: D06.07
Alternativa
Sensor de temperatura e humidade em 1 | DHT11
€ 1,80
Ver esta alternativa
Como ligar o Sensor de temperatura e humidade em 1 | Módulo DHT22 para breadboard a um Arduino UNO ou ESP32, com um sketch de exemplo que podes carregar já.
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.
/*
* ==================================================================
* 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"));
}
Bibliotecas necessárias: DHT sensor library 1.4.7
Wiring diagram and example code generated by Codey.online — https://www.codey.online
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.
/*
* ==================================================================
* 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");
}
Bibliotecas necessárias: DHT sensor library 1.4.7
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Este é o irmão mais velho do DHT11 e muito mais preciso. O sensor mede tanto a temperatura como a humidade.
Módulo para breadboard ou ligação simples de cabos Dupont (incluídos)
A faixa de medição da temperatura é de -40 a +80 graus Celsius.
Precisão de +/- 0.5 graus
Alimentação: 3.3v a 6v
Faixa de humidade: 0-100% RH.
Precisão da humidade: ±2,0% RH.
Tempo de resposta: < 3 sec.
Incl: cabos Dupont Female-Female
Dimensões
Comprimento: 4,35cm
Largura: 1,53cm
Altura: 0,97cm
| Alimentação | 3.3V a 6V |
|---|---|
| Largura | 1,53 cm |
| Adequado para | breadboard |
| Faixa de temperatura | -40 tot +80 °C |
| Comprimento | 4,35 cm |
| Altura | 0,97 cm |
| Precisão da temperatura | ± 0.5 °C |
| Faixa de humidade | 0-100% RH |
| Precisão da humidade | ±2,0% RH |
| Tempo de resposta | < 3 sec |
Preciso.
Não ficas satisfeito? Tens 30 dias após a receção para devolver o produto.
Tudo sobre devoluções
Sensor de temperatura e humidade em 1 | Módulo DHT22 para breadboard