TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136660 times)
  2. FAT32 Library (69898 times)
  3. Network Ethernet Library (55917 times)
  4. USB Device Library (46248 times)
  5. Network WiFi Library (41881 times)
  6. FT800 Library (41126 times)
  7. GSM click (28971 times)
  8. PID Library (26406 times)
  9. mikroSDK (26343 times)
  10. microSD click (25350 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

DHT22 2 click

Rating:

6

Author: MIKROE

Last Updated: 2021-07-30

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 5338 times

Not followed.

License: MIT license  

DHT22 2 click is used for measuring the environmental temperature and relative humidity. It uses the AM2322 sensor by ASAIR®, with very accurate thermal and humidity measuring capabilities. It can use either 1-Wire or I2C protocol to communicate with the integrated circuit.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DHT22 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DHT22 2 click" changes.

Do you want to report abuse regarding "DHT22 2 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

DHT22 2 click

DHT22 2 click

Native view of the DHT22 2 click board.

View full image
DHT22 2 click

DHT22 2 click

Front and back view of the DHT22 2 click

View full image

Library contains key functions used to read temperature and humidity data from the DHT22 2 click.

float DHT22_2_getTemperature();- Function for reading temperature from sensor

float DHT22_2_getHumidity()- Function for reading humidity from sensor

Examples Description

The example uses the library functions to read the temperature and humidity from the sensor and sends the data to the user, via the UART interface.
 

void applicationTask()
{
     temp = DHT22_2_getTemperature();
     humidity = DHT22_2_getHumidity();
     FloatToStr(temp,output);
     UART1_Write_Text("Temperature: ");
     UART1_Write_Text(output);
     UART1_Write_Text("°C");
     UART1_Write(13);
     UART1_Write(10);
     UART1_Write_Text("Humidity: ");
     FloatToStr(humidity,output);
     UART1_Write_Text(output);
     UART1_Write_Text("%");
     UART1_Write(13);
     UART1_Write(10);
     Delay_ms(1000);
}


Other mikroE Libraries used in the example:

  • UART
  • I2C

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB UART 2 clickor RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

 

ALSO FROM THIS AUTHOR

VCP Monitor click

5

The VCP Monitor Click is add-on board power monitor system. This Click board is based on INA260AIPWR - precision digital current and power monitor with low-drift, integrated precision shunt resistor, from Texas Instruments.

[Learn More]

Stepper 21 click

0

Stepper 21 Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the DRV8825, a stepper motor controller integral circuit from Texas Instruments. It is a PWM micro-stepping stepper motor driver with up to 1/32 micro-stepping resolution and a built-in micro-stepper indexer. The driver has two H-bridge drivers and is intended to drive a bipolar stepper motor in a voltage supply operating range of 8.2V up to 45V.

[Learn More]

microSD click

8

This project consists of several blocks that demonstrate various aspects of usage of the MMC_Fat16 library.

[Learn More]