![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
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 |
diff -r 000000000000 -r fb98ee6f1056 main.cpp --- /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); + } +}
diff -r 000000000000 -r fb98ee6f1056 mbed.bld --- /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