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: MQ2
Revision 1:e589b168e253, committed 2017-10-06
- Comitter:
- azazeal88
- Date:
- Fri Oct 06 09:34:51 2017 +0000
- Parent:
- 0:1e2a25e50796
- Child:
- 2:3a61e56476bc
- Commit message:
- RC1
Changed in this revision
| MQ2.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MQ2.lib Thu Oct 05 11:55:21 2017 +0000 +++ b/MQ2.lib Fri Oct 06 09:34:51 2017 +0000 @@ -1,1 +1,1 @@ -http://os.mbed.com/users/azazeal88/code/MQ2/#a5033edf6975 +http://os.mbed.com/users/azazeal88/code/MQ2/#c0ebeb4b47b6
--- a/main.cpp Thu Oct 05 11:55:21 2017 +0000
+++ b/main.cpp Fri Oct 06 09:34:51 2017 +0000
@@ -12,12 +12,14 @@
pc.printf("CO PPM: %.0f\r\n",mq2.readCO()); // Performs a one shot read of CO
pc.printf("Smoke PPM: %.0f\r\n",mq2.readSmoke()); // Performs a one shot read of Smoke
pc.printf("LPG PPM: %.0f\r\n",mq2.readLPG()); // Performs a one shot read of LPG
- wait(5);
+ wait(1);
+ pc.printf("................................\r\n");
mq2.read(&MQ2_data); // Alt reading method, reading to struct
pc.printf("CO PPM: %.0f\r\n",MQ2_data.co); // Return data from strut
pc.printf("Smoke PPM: %.0f\r\n",MQ2_data.smoke); // Return data from strut
pc.printf("LPG PPM: %.0f\r\n",MQ2_data.lpg); // Return data from strut
- wait(5);
+ pc.printf("................................\r\n");
+ wait(1);
}
}