MQ-135

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Tuxitheone
Date:
Fri Sep 23 19:43:30 2016 +0000
Commit message:
test

Changed in this revision

MQ135.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r cd033d9f7ce6 MQ135.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MQ135.lib	Fri Sep 23 19:43:30 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Skovbrynet/code/MQ135/#bf84a928ecc1
diff -r 000000000000 -r cd033d9f7ce6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 23 19:43:30 2016 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "mq135.h"
+
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+DigitalOut heat(p21);
+
+AnalogIn sensor(p19);
+Serial pc(USBTX, USBRX); //For raw data
+
+
+int main(void)
+{
+    while(1) {
+    myled1 = 1;
+    heat = 1;
+    printf("Sensor: %f\n\r", sensor.read()*3.3)-0,4919879;
+
+        wait(2.0);
+    myled1 = 0;
+    heat = 0;
+        wait(0.5);
+    }
+}
diff -r 000000000000 -r cd033d9f7ce6 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Sep 23 19:43:30 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/f9eeca106725
\ No newline at end of file