Mathieu Moneyron / Mbed 2 deprecated projetS1

Dependencies:   HP206C mbed HMC5883L DHT DS1820

main.cpp

Committer:
MathieuM
Date:
2018-10-02
Revision:
48:824fda6804f1
Parent:
46:40b6bbf6167e
Child:
49:b1ac7ebb715f

File content as of revision 48:824fda6804f1:

#include "mbed.h"
#include "config.h"
#include "communication.h"
#include "T_H_air.h"
#include "ssd1306.h"
#include "standard_font.h"
#include "bold_font.h"

Serial wisol(SERIAL_PORT);
DHT sensor(PIN_NAME, DHTtype);
SSD1306 screen(D11, D9, D13, A4, D2);

int main() {
    screen.initialise();
    screen.clear();
    screen.set_contrast(255); // max contrast
    screen.set_font(bold_font, 6);
    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);
        screen.printf("test");
        screen.update();
        wait(WAIT_TIME);
    }
}