dht22 2.0.0.0
|
API for configuring and manipulating DHT22 Click driver. More...
Topics | |
DHT22 MikroBUS Map | |
MikroBUS pin mapping of DHT22 Click driver. | |
DHT22 response status. | |
Settings for response status of DHT22 Click driver. | |
Functions | |
void | dht22_cfg_setup (dht22_cfg_t *cfg) |
DHT22 configuration object setup function. | |
err_t | dht22_init (dht22_t *ctx, dht22_cfg_t *cfg) |
DHT22 initialization function. | |
err_t | dht22_start_signal (dht22_t *ctx) |
DHT22 sends start signal to the sensor function. | |
err_t | dht22_check_sensor_response (dht22_t *ctx) |
DHT22 release the bus to wait the sensor response signal function. | |
err_t | dht22_get_sensor_data (dht22_t *ctx, uint16_t *hum_data, uint16_t *temp_data) |
DHT22 reading data from the sensor function. | |
err_t | dht22_get_measurement_data (dht22_t *ctx, float *humidity, float *temperature) |
DHT22 get measurement data from the sensor function. | |
err_t | dht22_init_sda_input (dht22_t *ctx) |
DHT22 init SDA data pin as input function. | |
err_t | dht22_init_sda_output (dht22_t *ctx) |
DHT22 init SDA data pin as output function. | |
API for configuring and manipulating DHT22 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void dht22_cfg_setup | ( | dht22_cfg_t * | cfg | ) |
DHT22 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dht22_cfg_t object definition for detailed explanation. |
err_t dht22_check_sensor_response | ( | dht22_t * | ctx | ) |
DHT22 release the bus to wait the sensor response signal function.
This function release the bus to wait the sensor response signal from the sensor AM2302 on the DHT22 Click.
[in] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |
0
- The sensor responded and is ready to read data, -1
- ERROR, Sensor not responding. err_t dht22_get_measurement_data | ( | dht22_t * | ctx, |
float * | humidity, | ||
float * | temperature ) |
DHT22 get measurement data from the sensor function.
This function reading and calculate measurement data from the sensor AM2302 on the DHT22 Click.
[in] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |
[out] | humidity | Percentage of relative humidity [% RH]. |
[out] | temperature | Temperature value in degrees Celsius [degree Celsius]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht22_get_sensor_data | ( | dht22_t * | ctx, |
uint16_t * | hum_data, | ||
uint16_t * | temp_data ) |
DHT22 reading data from the sensor function.
This function reading data from the sensor AM2302 on the DHT22 Click.
[in] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |
[out] | hum_data | 16-bit read humidity data value from the sensor. |
[out] | temp_data | 16-bit read temperature data value from the sensor. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht22_init | ( | dht22_t * | ctx, |
dht22_cfg_t * | cfg ) |
DHT22 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dht22_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht22_init_sda_input | ( | dht22_t * | ctx | ) |
DHT22 init SDA data pin as input function.
This functioninitializes SDA data pin as input of the sensor AM2302 on the DHT22 Click.
[in] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht22_init_sda_output | ( | dht22_t * | ctx | ) |
DHT22 init SDA data pin as output function.
This functioninitializes SDA data pin as output of the sensor AM2302 on the DHT22 Click.
[in] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht22_start_signal | ( | dht22_t * | ctx | ) |
DHT22 sends start signal to the sensor function.
This function sends the start signal to the tempemperature and humidity sensor AM2302 on DHT22 click board.
[in] | ctx | : Click context object. See dht22_t object definition for detailed explanation. |