TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (357 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 (137067 times)
  2. FAT32 Library (70198 times)
  3. Network Ethernet Library (56080 times)
  4. USB Device Library (46392 times)
  5. Network WiFi Library (42013 times)
  6. FT800 Library (41347 times)
  7. GSM click (29108 times)
  8. mikroSDK (26543 times)
  9. PID Library (26486 times)
  10. microSD click (25483 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: 5382 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

Thermo 9 Click

5

Thermo 9 Click is a Click board equipped with the TSYS01, a digital temperature sensor from TE Connectivity. Given its main features, the Thermo 9 Click, can be used for industrial control, replacement of thermistors and NTCs, heating/cooling systems, and HVAC.

[Learn More]

RS485 6 click

0

RS485 6 Click offers a half-duplex RS-485 communication with integrated surge protection

[Learn More]

Microwave 4 click

0

Microwave 4 Click is a compact add-on board that utilizes the Doppler Shift Phenomenon to sense motion. This board features the PD-V12, a miniature high-frequency microwave transceiver from Ningbo Pdlux Electronic Technology. The transmitter on this transceiver works on a 24.1GHz frequency over the flat Plane antenna.

[Learn More]