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:
- 62:d902b1e77094
- Parent:
- 56:d9557c842d5d
- Child:
- 64:7adaa9dfcb8c
--- a/main.cpp Tue Oct 09 11:47:36 2018 +0000
+++ b/main.cpp Tue Oct 09 12:27:17 2018 +0000
@@ -14,7 +14,7 @@
int main() {
while(1) {
- float airH = 0, tmpH, tmpT, airT = 0;
+ float airH = 0,airT = 0;
char *message;
int16_t magXYZ[3];
unsigned long alt;
@@ -37,15 +37,7 @@
//collect data
alt = readAltitude(&hp206c);
hmc5883.getXYZ(magXYZ);
- tmpH = airHumidity(sensor);
- if( tmpH!=0){
- airH = tmpH;
- }
- wait(2);
- tmpT = airTemperature(sensor);
- if( tmpT!=0 ){
- airT=tmpT;
- }
+ get_T_H_air(&airT, &airH, sensor)
// Display
pc.printf("\n=====| Data |=====\n");
