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.
Dependents: mbed_Wiznet_W7500 httpServer-WIZwiki-W7500
Fork of Air_Quality by
Revision 1:3d804fbaa44d, committed 2015-08-12
- Comitter:
- M_J
- Date:
- Wed Aug 12 04:49:28 2015 +0000
- Parent:
- 0:7653022b71cb
- Commit message:
- update
Changed in this revision
| Air_Quality.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Air_Quality.cpp Tue Aug 11 09:39:34 2015 +0000
+++ b/Air_Quality.cpp Wed Aug 12 04:49:28 2015 +0000
@@ -72,35 +72,32 @@
break;
}
// Call AirQualityInterrupt every 2seconds
- IntHandler.attach(IRQ, 2.0);
+ IntHandler.attach(IRQ, 0.5);
}
int AirQuality::slope(void)
{
while(timer_index) {
if(first_vol-last_vol > 400 || first_vol > 700) {
- printf("High pollution! Force signal active.\n\r");
+ printf("5. Air_quality : %d",first_vol);
timer_index = 0;
avgVoltage();
return 0;
} else if((first_vol - last_vol > 400 && first_vol < 700) || first_vol - vol_standard > 150) {
- printf("Air_quality:%d",first_vol);
- printf("\t High pollution!\n\r");
+ printf("5. Air_quality : %d",first_vol);
timer_index = 0;
avgVoltage();
return 1;
} else if((first_vol-last_vol > 200 && first_vol < 700) || first_vol - vol_standard > 50) {
//printf(first_vol-last_vol);
- printf("Air_quality:%d",first_vol);
- printf("\t Low pollution!\n\r");
+ printf("5. Air_quality : %d",first_vol);
timer_index = 0;
avgVoltage();
return 2;
} else {
avgVoltage();
- printf("Air_quality:%d",first_vol);
- printf("\t Air fresh\n\r");
+ printf("5. Air_quality : %d",first_vol);
timer_index = 0;
return 3;
}
