Mathieu Moneyron / Mbed 2 deprecated projetS1

Dependencies:   HP206C mbed HMC5883L DHT DS1820

main.cpp

Committer:
MathieuM
Date:
2018-10-01
Revision:
46:40b6bbf6167e
Parent:
45:60f602ecd59b
Child:
48:824fda6804f1

File content as of revision 46:40b6bbf6167e:

#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
        read H sol
        read Pressure
        read Magnetic
        
        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);
    }
}