Isme serially plot hotai Pot ka int value with respect to time
Dependencies: mbed
Revision 0:deed3ba88ccb, committed 2016-07-01
- Comitter:
- akashlal
- Date:
- Fri Jul 01 09:17:37 2016 +0000
- Commit message:
- nq
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 deed3ba88ccb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jul 01 09:17:37 2016 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Serial pc(USBTX,USBRX); +AnalogIn pot(PTB0); + +float valuef; +int valuei; +int main() +{ + while(1) + { + valuef=pot.read(); + valuei=valuef*3.3*1000; + pc.printf("$%d;",valuei); + pc.printf("\n \r"); + } +}
diff -r 000000000000 -r deed3ba88ccb mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jul 01 09:17:37 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file