Temperature sensor

Specials

No special products at this time.

Viewed products

Humidity and temperature sensor DHT22 AM2302

LANKON-032

New product

Sensor for temperature and humidity.Cooperating with LanKontrolerem ( work only with LK2, don't compatible with LK3) of oprogramopwaniem-line 3.xx version 3.4 the latest soft

More details

This product is no longer in stock

5.49 USD tax incl.

More info

sensor DHT22 ( AM2302 )
for measuring humidity (works best in the range of 0% -100% RH with an accuracy of ±2% RH)
and temperature: -40 ° C to 125 ° C ± 0.5 ° C
 

on end we print Sample code for ARDUINO with 4pcs  DHT22:

with LCD display 4x20

 

   Sample SCREEN (in the example photo DHT11, but pinout in DHT 22 is same) in LanKontroller.:

 
(NOTE Connection Cables are available for purchase in this section)

 

sensor DHT22for measuring humidity (works best in the range of 0% -100% RH with an accuracy of ± 2% RH)and temperature: -40 ° C to 125 ° C ± 0.5 ° C      Sample SCREEN (in the example photo DHT11) in LanKontrolerze.: (NOTE Connection Cables are available for purchase in this section)

 

OPTIONA CABLE is for buy in this Categorie


Sample View in LanKontroler

 

Schemat podłączenia

 

 

 

 

 

SAMPLE CODE FOR Arduino:

 

#include "DHT.h"
#include <Wire.h> // standardowa biblioteka Arduino
#include <LiquidCrystal_I2C.h> // dolaczenie pobranej biblioteki I2C dla LCD

//obsługa I2C do wyświetlacz
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Ustawienie adresu ukladu na 0x27

#define DHTPIN1 2 // what digital pin we're connected to
#define DHTPIN2 3 // what digital pin we're connected to
#define DHTPIN3 4 // what digital pin we're connected to
#define DHTPIN4 5 // what digital pin we're connected to

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11 // DHT 11
#define DHTTYPE1 DHT22 // DHT 22 (AM2302), AM2321
#define DHTTYPE2 DHT22 // DHT 22 (AM2302), AM2321
#define DHTTYPE3 DHT22 // DHT 22 (AM2302), AM2321
#define DHTTYPE4 DHT22 // DHT 22 (AM2302), AM2321
//#define DHTTYPE DHT21 // DHT 21 (AM2301)


int dhtc [4] = {1, 2, 3, 4};
char hnr [] = "h1, h2, h3, h4";

DHT dht1(DHTPIN1, DHTTYPE1);
DHT dht2(DHTPIN2, DHTTYPE2);
DHT dht3(DHTPIN3, DHTTYPE3);
DHT dht4(DHTPIN4, DHTTYPE4);


void setup() {
lcd.begin(20, 4); // Inicjalizacja LCD 2x16
//Serial.begin(9600);
lcd.print("DHTxx Multi sensor!");

dht1.begin();
dht2.begin();
dht3.begin();
dht4.begin();
delay(2000);
lcd .clear();
}

void loop() {
// Wait a few seconds between measurements.

// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
int h1 = dht1.readHumidity(); //bylo float , float jesli chcemy zpo przecinku
delay (250);
int h2 = dht2.readHumidity();
delay (250);
int h3 = dht3.readHumidity();
delay (250);
int h4 = dht4.readHumidity();
delay (250);
// Read temperature as Celsius (the default)
float t1 = dht1.readTemperature();
int t2 = dht2.readTemperature();
float t3 = dht3.readTemperature();
float t4 = dht4.readTemperature();
// Odczyt temperatury w Fahrenheit (isFahrenheit = true)
float f1 = dht1.readTemperature(true);
float f2 = dht2.readTemperature(true);
float f3 = dht3.readTemperature(true);
float f4 = dht4.readTemperature(true);

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

// Compute heat index in Fahrenheit (the default)
float hif1 = dht1.computeHeatIndex(f1, h1);
float hif2 = dht1.computeHeatIndex(f2, h2);
float hif3 = dht1.computeHeatIndex(f3, h3);
float hif4 = dht1.computeHeatIndex(f4, h4);
/// Compute heat index in Celsius (isFahreheit = false)
float hic1 = dht1.computeHeatIndex(t1, h1, false);
// float hic2 = dht1.computeHeatIndex(t2, h2, false);
// float hic3 = dht1.computeHeatIndex(t3, h3, false);
// float hic4 = dht1.computeHeatIndex(t4, h4, false);

//for (int x=1; x< 5; x++){
//
// lcd.setCursor (0,0);/////dhtc[x]);
// lcd.print ("H" + x );
//
// lcd.print(h[x]);
// Serial.print (h[x]);
// }


//for (int yy = 0; yy < 1; yy++) {
lcd.setCursor (0, 0);
lcd.print ("H");
lcd.print("1"); // liczba za H
lcd.print(": ");
lcd.print(h1);
lcd.print("%");
lcd.print(" ");
lcd.print(hic1);

// /}

//DHT nr 2
lcd.setCursor(0, 1);
lcd.print ("H2: ");
lcd.print(h2);
lcd.print("%");
lcd.print(" T: ");
lcd.print(t2);
lcd.print("*C ");

///DHT 3
lcd.setCursor(0, 2);
lcd.print ("H3: ");
lcd.print(h3);
lcd.print("%");

// DHT 4
lcd.setCursor(0, 3);
lcd.print ("H4: ");
lcd.print(h4);
lcd.print("%");

delay(2000);
}

21 other products in the same category: