CO2 Sensor MH-Z19 Class (uses interrupt input as PWM input)

Dependencies:   mbed

Revision:
0:3c154d34f47e
diff -r 000000000000 -r 3c154d34f47e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 11 00:41:23 2016 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "MH_Z19.h"
+
+DigitalOut myled(LED1);
+MH_Z19 Sen(p5);
+
+int main() {
+    
+    wait(2);
+    
+    while(1) {
+        myled = 1;
+        wait(0.2);
+        myled = 0;
+        printf("CO2 PPM:%d\n",Sen.ReadCO2PPM());
+        wait(1.8);
+    }
+}