Harish Mekali
/
5_Serial_communication
5_Serial_communication
Revision 0:6bc1fd344c20, committed 2013-10-04
- Comitter:
- HarishMekali
- Date:
- Fri Oct 04 18:29:09 2013 +0000
- Commit message:
- 5 Serial Communication
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 6bc1fd344c20 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 04 18:29:09 2013 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); // tx, rx +AnalogIn s1(p20); + +int main() + { + float x; + while(1) + { + x=s1.read(); + pc.printf("%f",x); + wait(1); + pc.printf("%f",x); + wait(1); +} +} \ No newline at end of file
diff -r 000000000000 -r 6bc1fd344c20 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 04 18:29:09 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5e5da4a5990b \ No newline at end of file