dht222 2.0.0.0
|
DHT22 2 click is used for measuring the environmental temperature and relative humidity. It uses the AM2322 sensor, with very accurate thermal and humidity measuring capabilities. It can use either 1-Wire or I2C protocol to communicate with the integrated circuit.
We provide a library for the Dht222 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Dht222 Click driver.
dht222_cfg_setup
Config Object Initialization function. dht222_init
Initialization function. dht222_read_reg
This function reads data from the desired register. dht222_write_reg
This function writes data to the desired register. dht222_get_temp_hum
The function reads the temperature and humidity data from the sensor AM2322 on the DHT22 2 Click. This example demonstrates the use of DHT22 2 click board by reading the temperature and humidity data.
The demo application is composed of two sections :
Initializes the driver and logger.
Reads the temperature (degrees C) and the relative humidity (RH) data and displays the results on the USB UART approximately once per second.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or 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.