Phi1976
Published © GPL3+

Temperature monitoring sysetm

A beginner setup to test 2 DHT22 sensor on an Arduino UNO rev3 board 4,7k ohm.

BeginnerWork in progress585
 Temperature monitoring sysetm

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DHT22 Temperature Sensor
DHT22 Temperature Sensor
×2
Jumper wires (generic)
Jumper wires (generic)
×1
Resistor 4.75k ohm
Resistor 4.75k ohm
×2
Breadboard (generic)
Breadboard (generic)
×1

Story

Read more

Schematics

2DHT22 AM2302 Sensor

Test project

Diagram

Code

Untitled file

C/C++
#include <dht.h>

dht DHT1;
dht DHT2;

#define DHT22_1_PIN 2
#define DHT22_2_PIN 3


void setup() {                
  // Wait a few seconds between measurements. The DHT22 should not be read at a higher frequency of
  // about once every 2 seconds. So we add a 5 second delay to cover this. you can change the delay frequency at the end of the code list. 
  Serial.begin(9600);
  Serial.println("Système en ligne...");
  Serial.println("Lecture aux 5 secondes");
}




void loop() {


    DHT1.read22(DHT22_1_PIN);
    DHT2.read22(DHT22_2_PIN);

 
 Serial.println("Intérieur"); 
 Serial.print("  Humidité  ");Serial.print(DHT1.humidity); Serial.print(" %");
 Serial.print("  Température  "); Serial.print(DHT1.temperature);Serial.println(" C°");

 Serial.println("Extérieur"); 
 Serial.print("  Humidité  "); Serial.print(DHT2.humidity); Serial.print(" %");
 Serial.print("  Température  "); Serial.print(DHT2.temperature);Serial.println(" C°");

 Serial.println("-----------------");
 Serial.println(" ");

  delay(5000); //  you can change the delay frequency here.
}

2DHT22 AM2302 Sensor

Arduino
Test project
No preview (download only).

Credits

Phi1976
1 project • 0 followers

Comments