dht22
2.0.0.0
|
Functions | |
void | dht22_cfg_setup (dht22_cfg_t *cfg) |
Config Object Initialization function. More... | |
err_t | dht22_init (dht22_t *ctx, dht22_cfg_t *cfg) |
Initialization function. More... | |
err_t | dht22_start_signal (dht22_t *ctx) |
Sends start signal to the sensor function. More... | |
err_t | dht22_check_sensor_response (dht22_t *ctx, uint8_t *check_out) |
Release the bus to wait the sensor response signal function. More... | |
err_t | dht22_get_sensor_data (dht22_t *ctx, uint32_t *data_out) |
Reading data from the sensor function. More... | |
uint16_t | dht22_get_temperature (dht22_t *ctx, uint32_t sensor_data) |
Get the temperature data function. More... | |
float | dht22_calculate_temperature (dht22_t *ctx, uint32_t sensor_data) |
Calculate the temperature in degrees Celsius function. More... | |
uint16_t | dht22_get_humidity (dht22_t *ctx, uint32_t sensor_data) |
Get the humidity data function. More... | |
float | dht22_calculate_humidity (dht22_t *ctx, uint32_t sensor_data) |
Calculate the humidity in percentage function. More... | |
err_t | dht22_init_sda_input (dht22_t *ctx) |
Init SDA data pin as input. More... | |
err_t | dht22_init_sda_output (dht22_t *ctx) |
Init SDA data pin as output. More... | |
float dht22_calculate_humidity | ( | dht22_t * | ctx, |
uint32_t | sensor_data | ||
) |
Calculate the humidity in percentage function.
ctx | Click object. |
sensor_data | 32-bit read value from the sensor ( temperature and humidity data ). |
@description The function calculate the percentage of humidity [ % RH ] from sensor data reading from the sensor AM2302 on the DHT22 Click.
float dht22_calculate_temperature | ( | dht22_t * | ctx, |
uint32_t | sensor_data | ||
) |
Calculate the temperature in degrees Celsius function.
ctx | Click object. |
sensor_data | 32-bit read value from the sensor ( temperature and humidity data ). |
@description The function calculate the temperature in degrees Celsius [ C ] from sensor data reading from the sensor AM2302 on the DHT22 Click.
void dht22_cfg_setup | ( | dht22_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
err_t dht22_check_sensor_response | ( | dht22_t * | ctx, |
uint8_t * | check_out | ||
) |
Release the bus to wait the sensor response signal function.
ctx | Click object. |
check_out | 0 : ERROR, Sensor not responding. 1 : The sensor responded and is ready to read data. |
@description The function release the bus to wait the sensor response signal from the sensor AM2302 on the DHT22 Click.
uint16_t dht22_get_humidity | ( | dht22_t * | ctx, |
uint32_t | sensor_data | ||
) |
Get the humidity data function.
ctx | Click object. |
sensor_data | 32-bit read value from the sensor ( temperature and humidity data ). |
@description The function calculate the humidity data from sensor data reading from the sensor AM2302 on the DHT22 Click.
err_t dht22_get_sensor_data | ( | dht22_t * | ctx, |
uint32_t * | data_out | ||
) |
Reading data from the sensor function.
ctx | Click object. |
data_out | 32-bit read value from the sensor ( temperature and humidity data ). |
@description The function reading data from the sensor AM2302 on the DHT22 Click.
uint16_t dht22_get_temperature | ( | dht22_t * | ctx, |
uint32_t | sensor_data | ||
) |
Get the temperature data function.
ctx | Click object. |
sensor_data | 32-bit read value from the sensor ( temperature and humidity data ). |
@description The function calculate the temperature data from sensor data reading from the sensor AM2302 on the DHT22 Click.
err_t dht22_init | ( | dht22_t * | ctx, |
dht22_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
err_t dht22_init_sda_input | ( | dht22_t * | ctx | ) |
Init SDA data pin as input.
ctx | Click object. |
@description This function initializes SDA data pin as input.
err_t dht22_init_sda_output | ( | dht22_t * | ctx | ) |
Init SDA data pin as output.
ctx | Click object. |
@description This function initializes SDA data pin as output.
err_t dht22_start_signal | ( | dht22_t * | ctx | ) |
Sends start signal to the sensor function.
ctx | Click object. |
@description The function sends the start signal to the tempemperature and humidity sensor AM2302 on the DHT22 Click.