projet capteur connecté ST/SE
Dependencies: HP206C mbed HMC5883L DHT DS1820
Revision 41:d3434f5816ad, committed 2018-10-01
- Comitter:
- SBACCARI
- Date:
- Mon Oct 01 09:42:38 2018 +0000
- Parent:
- 40:0b19a258c614
- Child:
- 44:46310c0f1662
- Commit message:
- code T_H_air update
Changed in this revision
T_H_air.cpp | Show annotated file Show diff for this revision Revisions of this file |
T_H_air.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/T_H_air.cpp Mon Oct 01 09:31:55 2018 +0000 +++ b/T_H_air.cpp Mon Oct 01 09:42:38 2018 +0000 @@ -12,4 +12,15 @@ } warningAir = 1; return EXIT_FAILURE ; + } + +float airTemperature(){ + int err = 0; + + err = sensor.readData(); + if( !err ){ + return sensor.ReadTemperature(CELCIUS) ; + } + warningAir = 1; + return EXIT_FAILURE ; } \ No newline at end of file
--- a/T_H_air.h Mon Oct 01 09:31:55 2018 +0000 +++ b/T_H_air.h Mon Oct 01 09:42:38 2018 +0000 @@ -5,4 +5,5 @@ #define PinName D2 #define DHTtype DHT22 -float airHumidity( void ); \ No newline at end of file +float airHumidity( void ); +float airTemperature(); \ No newline at end of file