Driver for the DHT22 temperature and humidity sensor.
More...
|
| file | dht22.c |
| | Driver for the DHT22 temperature and humidity sensor.
|
| |
| file | dht22.h |
| | Header file for the DHT22 temperature and humidity sensor.
|
| |
|
|
int16_t | dht22_read_all (int16_t *temperature, int16_t *humidity) |
| |
|
|
#define | DHT22_READ_TEMP 0x01 |
| |
|
#define | DHT22_READ_HUM 0x02 |
| |
|
#define | DHT22_READ_ALL 0x03 |
| |
|
|
#define | DHT22_ERROR (-1) |
| |
|
#define | DHT22_SUCCESS 0x00 |
| |
|
#define | DHT22_BUSY 0xFF |
| |
|
|
#define | DHT22_BUFFER 5 |
| | Buffer to store the samples
|
| |
|
#define | DHT22_COUNT 8 |
| | Minimum ticks to detect a "1" bit
|
| |
|
#define | DHT22_MAX_TIMMING 85 |
| | Maximum ticks in a single operation.
|
| |
|
#define | DHT22_READING_DELAY 1 |
| | 1 us
|
| |
|
#define | DHT22_READY_TIME 40 |
| | 40 us
|
| |
|
#define | DHT22_START_TIME (RTIMER_SECOND / 50) |
| | 20 ms
|
| |
|
#define | DHT22_AWAKE_TIME (RTIMER_SECOND / 4) |
| | 250 ms
|
| |
Driver for the DHT22 temperature and humidity sensor.