Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HP206C mbed HMC5883L DHT DS1820
main.cpp
- Committer:
- MathieuM
- Date:
- 2018-10-08
- Revision:
- 49:b1ac7ebb715f
- Parent:
- 48:824fda6804f1
- Child:
- 52:d49b6f468b97
File content as of revision 49:b1ac7ebb715f:
#include "mbed.h"
#include "config.h"
#include "communication.h"
#include "T_H_air.h"
#include "altitude.h"
Serial wisol(SERIAL_PORT);
Serial pc(USBTX, USBRX);
DHT sensor(PIN_NAME, DHTtype);
I2C hp206c(D12, A6);
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);
unsigned long alt = readAltitude(&hp206c);
pc.printf("H air : %f\n", airH);
pc.printf("T air : %f\n", airT);
pc.printf("altitude : %lu\n", alt);
wait(1);
}
}
