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
Diff: main.cpp
- Revision:
- 46:40b6bbf6167e
- Parent:
- 45:60f602ecd59b
- Child:
- 48:824fda6804f1
diff -r 60f602ecd59b -r 40b6bbf6167e main.cpp
--- 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);
}
}
