Mathieu Moneyron / Mbed 2 deprecated projetS1

Dependencies:   HP206C mbed HMC5883L DHT DS1820

Revision:
46:40b6bbf6167e
Parent:
45:60f602ecd59b
Child:
48:824fda6804f1
--- a/main.cpp	Mon Oct 01 10:02:53 2018 +0000
+++ b/main.cpp	Mon Oct 01 10:32:14 2018 +0000
@@ -1,11 +1,15 @@
 #include "mbed.h"
 #include "config.h"
 #include "communication.h"
+#include "T_H_air.h"
 
 Serial wisol(SERIAL_PORT);
+DHT sensor(PIN_NAME, DHTtype);
 
 int main() {
     while(1) {
+        float airH, airT;
+        char *message;
         /*
         read T&H air
         read T sol
@@ -16,6 +20,10 @@
         m = genMessage(T_air, H_air, T_sol, H_sol, Pressure, Mag)
         sendMessage(m)
         */
+        airH = airHumidity(sensor);
+        airT = airTemperature(sensor);
+        message = genMessage(airT, airH);
+        wisol.printf("AT$SF=%s\r\n", message);
         wait(WAIT_TIME);
     }
 }