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.
Revision 0:416ee6da1e91, committed 2015-01-01
- 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