Formazione / Mbed OS mq2_example

Dependencies:   MQ2

Files at this revision

API Documentation at this revision

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);
     }
 }