sensor_dht22.h File Reference

library to query measurements from Aosong DHT22 (aka. More...

Go to the source code of this file.

## Data Structures

struct | sensor_dht22_measurement_t
| measurement returned by sensor More...

## Functions

void | sensor_dht22_setup (void)
| setup peripherals to communicate with sensor
bool | sensor_dht22_measurement_request (void)
| request measurement from sensor More...
struct sensor_dht22_measurement_t | sensor_dht22_measurement_decode (void)
| decode received measurement More...

## Variables

volatile bool | sensor_dht22_measurement_received
| a measurement response has been received

## Detailed Description

library to query measurements from Aosong DHT22 (aka.

AM2302) temperature and relative humidity sensor (API)

Author
  King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info

Date
  2017

Note
  peripherals used: timer channel timer peripheral used to measure signal timing for bit decoding (add external pull-up resistor)

Definition in file sensor_dht22.h.

## Function Documentation

## sensor_dht22_measurement_decode()

struct sensor_dht22_measurement_t sensor_dht22_measurement_decode | ( | void |  | ) |

decode received measurement

Returns
  decoded measurement (0xff,0xff if invalid)

Definition at line 126 of file sensor_dht22.c.

## sensor_dht22_measurement_request()

bool sensor_dht22_measurement_request | ( | void |  | ) |

request measurement from sensor

Returns
  request started successfully

Definition at line 104 of file sensor_dht22.c.