Day 2 start - Ek setpoint ke niche light off hotai, uske oopar on hotai
Dependencies: mbed
Revision 0:8ca79fc584a1, committed 2016-06-29
- Comitter:
- akashlal
- Date:
- Wed Jun 29 05:53:28 2016 +0000
- Commit message:
- na
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jun 29 05:53:28 2016 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +AnalogIn pot(PTB0); +DigitalOut led(PTB18); + +float value; +int main() +{ + while(1) + { + value=pot.read(); + if(value<0.5) + { + led=1; + } + else + { + led=0; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jun 29 05:53:28 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file