DHT11 Module

DHT11 Temperature and Relative Humidity Sensor Module With Cable


25 ₪

الناشر: متجر القطع الالكترونية

القسم: مستشعرات - سينسور

تاريخ النشر: 2021-07-15





Overview:

- DHT11 send Dupont Line Module - Product Features A long dimension: 28mm X 12mm X height 10mm width Second, the main chip: Ozon DHT11 temperature and humidity sensor Third, the working voltage: DC 5V - Four characteristics: 1. A humidity measuring range :20 --- 90% RH 2. humidity measurement accuracy: ± 5% RH 3., the temperature measuring range :0 --- 60 4. the temperature measurement accuracy: ± 2 5. the working voltage: DC5V 6. the digital signal output



ملاحظة هناك نوع لا يعمل الا على 3.3 فولت ونوع على 5 فولت





code:

code
نسخ
اقتباس
عرض
تنزيل
	
								
#include <Wire.h> #include "DHT.h" // Uncomment one of the lines below for whatever DHT sensor type you're using! //#define DHTTYPE DHT11 // DHT 11 //#define DHTTYPE DHT21 // DHT 21 (AM2301) #define DHTTYPE DHT11 // DHT 22 (AM2302), AM2321 //DHT Sensor; uint8_t DHTPin = 2; DHT dht(DHTPin, DHTTYPE); float Temperature; float Humidity; float Temp_Fahrenheit; void setup() { Serial.begin(115200); pinMode(DHTPin, INPUT); dht.begin(); } void loop() { Humidity = dht.readHumidity(); // Read temperature as Celsius (the default) Temperature = dht.readTemperature(); // Read temperature as Fahrenheit (isFahrenheit = true) Temp_Fahrenheit= dht.readTemperature(true); // Check if any reads failed and exit early (to try again). if (isnan(Humidity) || isnan(Temperature) || isnan(Temp_Fahrenheit)) { Serial.println(F("Failed to read from DHT sensor!")); return; } Serial.print(F("Humidity: ")); Serial.print(Humidity); Serial.print(F("% Temperature: ")); Serial.print(Temperature); Serial.print(F("°C ")); Serial.print(Temp_Fahrenheit); Serial.println(F("°F ")); delay(1000); }





سلة المشتريات افراغ السلة