projet capteur connecté ST/SE
Dependencies: HP206C mbed HMC5883L DHT DS1820
Diff: T_H_air.cpp
- Revision:
- 62:d902b1e77094
- Parent:
- 53:a0752606d02c
- Child:
- 64:7adaa9dfcb8c
--- a/T_H_air.cpp Tue Oct 09 11:47:36 2018 +0000 +++ b/T_H_air.cpp Tue Oct 09 12:27:17 2018 +0000 @@ -25,4 +25,20 @@ return sensor.ReadTemperature(CELCIUS) ; } return 0; +} + +void get_T_H_air(int* T, int* H, DHT sensor) +{ + int tmpH, tmpT ; + + tmpT = airTemperature(sensor); + if( tmpT!=0 ) { + *T=tmpT; + } + wait(2); + + tmpH = airHumidity(sensor); + if( tmpH!=0) { + *H = tmpH; + } } \ No newline at end of file