Mathieu Moneyron / Mbed 2 deprecated projetS1

Dependencies:   HP206C mbed HMC5883L DHT DS1820

Revision:
66:cbfcea17a3c5
Parent:
65:3f898ad77cb5
Child:
67:3ccbc6a532eb
diff -r 3f898ad77cb5 -r cbfcea17a3c5 main.cpp
--- a/main.cpp	Tue Oct 09 12:36:37 2018 +0000
+++ b/main.cpp	Tue Oct 09 14:43:03 2018 +0000
@@ -9,7 +9,7 @@
 Serial wisol(SERIAL_PORT);
 Serial pc(USBTX, USBRX);
 DHT sensor(PIN_NAME, DHTtype);
-//HP20x_dev hp206c(HP20X_I2C_PORT);
+HP20x_dev barometre(HP20X_I2C_PORT);
 HMC5883L hmc5883(HMC5883_I2C_PORT);
 
 int main() {
@@ -18,6 +18,7 @@
         char *message;
         int16_t magXYZ[3];
         unsigned long alt;
+        long P = 0;
         /*
         read T&H air
         read T sol
@@ -38,6 +39,7 @@
         //alt = readAltitude(&hp206c);
         hmc5883.getXYZ(magXYZ);
         get_T_H_air(&airT, &airH, sensor); // takes 2s to execute
+        P = pression(barometre);
         
         // Display
         pc.printf("\n=====| Data |=====\n");