projet capteur connecté ST/SE
Dependencies: HP206C mbed HMC5883L DHT DS1820
T_H_air.h
- Committer:
- MathieuM
- Date:
- 2018-12-10
- Revision:
- 82:6f5913a97489
- Parent:
- 64:7adaa9dfcb8c
File content as of revision 82:6f5913a97489:
#include "mbed.h" #include "DHT.h" #include "config.h" /* ************************ MODE D'EMPLOI ***************************************************** This file contains functions to use with DHT22 sensor Reading humidity and temperature values cannot be done simultaneously At least 2s of wait time is needed between fetching the temprature value and the humidity value Documentaation and biblipgraphy note that the sensor is slow and so values will have a delay of a few seconds compared to real life The following code works perfectly on its own : airH = airHumidity(sensor); if( airH!=0){ pc.printf("H = %.2f pourcent \r\n", airH); } wait(2); airT = airTemperature(sensor); if( airT!=0 ){ pc.printf("T = %.2f \r\n", airT); } *************************************************************************************************/ float airHumidity(DHT sensor); float airTemperature(DHT sensor); void get_T_H_air(float* T, float* H, DHT sensor);