Analog input ke hisaaf se LED ka light intensity vary hotai shahne jaise
Dependencies: mbed
Revision 0:fb98ee6f1056, committed 2016-06-29
- Comitter:
- akashlal
- Date:
- Wed Jun 29 05:56: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:56:28 2016 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +AnalogIn pot(PTB0); +PwmOut led(PTD1); + +float value; +int main() +{ + while(1) + { + value=pot.read(); + led=1-value; + wait(0.1); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jun 29 05:56:28 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file