Karthik Varanasi / Mbed 2 deprecated Alcohol_Detection

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
vvrsk
Date:
Thu Jan 01 08:30:38 2015 +0000
Commit message:
This a program to detect alcohol using MQ3 sensor and the LPC 1768.

Changed in this revision

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 416ee6da1e91 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jan 01 08:30:38 2015 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+ DigitalOut myled(LED1);
+ AnalogIn alcohol(p16);
+ 
+int main() {
+    while(1) {
+        if(alcohol>0.7) {
+          printf("The alcohol percentage in your breath is ! (%f)\n", alcohol.read());             
+        myled = 1;
+        wait(4);
+        myled = 0;
+        wait(0.2);
+        }
+    }
+}
+
+
+
diff -r 000000000000 -r 416ee6da1e91 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jan 01 08:30:38 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/078e4b97a13e