sensor_dht22.h
Go to the documentation of this file.
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
extern volatile bool sensor_dht22_measurement_received;
struct sensor_dht22_measurement_t {
float humidity;
float temperature;
};
void sensor_dht22_setup(void);
bool sensor_dht22_measurement_request(void);
struct sensor_dht22_measurement_t sensor_dht22_measurement_decode(void);
sensor_dht22_measurement_t::temperature
float temperature
temperature in °C (-40-80)
Definition: sensor_dht22.h:29
sensor_dht22_measurement_decode
struct sensor_dht22_measurement_t sensor_dht22_measurement_decode(void)
decode received measurement
Definition: sensor_dht22.c:126
sensor_dht22_measurement_t::humidity
float humidity
relative humidity in RH (0-100)
Definition: sensor_dht22.h:28
sensor_dht22_measurement_received
volatile bool sensor_dht22_measurement_received
a measurement response has been received
Definition: sensor_dht22.c:46
sensor_dht22_setup
void sensor_dht22_setup(void)
setup peripherals to communicate with sensor
Definition: sensor_dht22.c:79
sensor_dht22_measurement_t
measurement returned by sensor
Definition: sensor_dht22.h:27
sensor_dht22_measurement_request
bool sensor_dht22_measurement_request(void)
request measurement from sensor
Definition: sensor_dht22.c:104