Sale!

AM2302 / DH22 IC

Original price was: 13,11 €.Current price is: 9,50 €. Excluding VAT

The AM2302/DH22 IC is a temperature and humidity sensor ideal for Arduino projects. It precisely monitors the environment for IoT applications.

Available on back-order

Domande su questo prodotto? Scrivi a Lana su WhatsApp

Description

Tutorial: How to use AM2302 / DH22

The AM2302 / DH22 is a temperature and humidity sensor that allows for precise monitoring of environmental conditions. Ideal for home or laboratory monitoring projects.

What you need

  • Arduino Uno or compatible
  • USB cable
  • Connect to PC

Steps

  1. Connect VCC to 5V of the Arduino
  2. Connect GND to GND of the Arduino
  3. Connect DATA to a digital pin of the Arduino (e.g., 2)
  4. Install the Adafruit_AM2315 library (or similar) from the Arduino IDE
  5. Check the datasheet for the specific pins of your sensor
  6. Write the example sketch provided by the library
  7. Upload the sketch to the Arduino
  8. View the temperature and humidity data on the serial monitor

Example code

Include <Adafruit_AM2315.h>
Adafruit_AM2315 am2315 = Adafruit_AM2315();
void setup() {
  Serial.begin(9600);
  if(!am2315.begin()) {
    Serial.println(F("Errore durante l'inizializzazione del sensore"));
    while(1);
  }
}
void loop() {
  float temperatura = am2315.readTemperature();
  float umidita = am2315.readHumidity();
  Serial.print(temperatura);
  Serial.print(", ");
  Serial.println(umidita);
  delay(2000);
}

Mini project

Create an alarm system that sends an SMS message when the temperature exceeds a certain limit. Use a GSM module or similar.

Common mistakes

  • Pin connection error
  • Library not installed correctly
  • Insufficient power supply issues
  • Data not read correctly

Recommended accessories

  • GSM module for alarm
  • LCD display for data visualization
  • Backup battery for Arduino
  • Ethernet cable for internet connection

Frequently asked questions

The sensor is not working
Check the pin connections and power supply. Ensure the library is installed correctly.

Where can I find the datasheet?
The datasheet is available on the manufacturer’s website or on GitHub.

Can I use the sensor with Raspberry Pi?
Yes, but you might need to use a different library or a logic level converter.

Reviews

There are no reviews yet.

Be the first to review “AM2302 / DH22 IC”

Your email address will not be published. Required fields are marked *