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:
- 54:61d003e0754d
- Parent:
- 53:a0752606d02c
- Child:
- 56:d9557c842d5d
--- a/main.cpp Mon Oct 08 10:19:07 2018 +0000
+++ b/main.cpp Mon Oct 08 10:33:30 2018 +0000
@@ -27,25 +27,28 @@
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);
*/
- //airH = airHumidity(sensor);
- //airT = airTemperature(sensor);
- //message = genMessage(airT, airH);
- //wisol.printf("AT$SF=%s\r\n", message);
+
+ //collect data
alt = readAltitude(&hp206c);
hmc5883.getXYZ(magXYZ);
- pc.printf("\n=====| Data |=====\n");
tmpH = airHumidity(sensor);
if( tmpH!=0){
airH = tmpH;
- }
-
+ }
wait(2);
-
tmpT = airTemperature(sensor);
if( tmpT!=0 ){
airT=tmpT;
}
+
+ // Display
+ pc.printf("\n=====| Data |=====\n");
pc.printf("H air : %.2f \%\n", airH);
pc.printf("T air : %.2f °C\n", airT);
pc.printf("altitude : %lu m\n", alt);
