Mathieu Moneyron / Mbed 2 deprecated projetS1

Dependencies:   HP206C mbed HMC5883L DHT DS1820

Revision:
56:d9557c842d5d
Parent:
54:61d003e0754d
Parent:
55:887edb961698
Child:
62:d902b1e77094
--- a/main.cpp	Mon Oct 08 10:33:30 2018 +0000
+++ b/main.cpp	Tue Oct 09 11:40:10 2018 +0000
@@ -9,12 +9,12 @@
 Serial wisol(SERIAL_PORT);
 Serial pc(USBTX, USBRX);
 DHT sensor(PIN_NAME, DHTtype);
-I2C hp206c(HP20X_I2C_PORT);
+HP20x_dev hp206c(HP20X_I2C_PORT);
 HMC5883L hmc5883(HMC5883_I2C_PORT);
 
 int main() {
     while(1) {
-        float airH, tmpH, tmpT, airT;
+        float airH = 0, tmpH, tmpT, airT = 0;
         char *message;
         int16_t magXYZ[3];
         unsigned long alt;
@@ -40,7 +40,7 @@
         tmpH = airHumidity(sensor);
         if( tmpH!=0){
             airH = tmpH;
-        } 
+        }
         wait(2);
         tmpT = airTemperature(sensor);
         if( tmpT!=0 ){