Guilherme Sionek
/
Analog2Serial
Revision 0:9fd57d64879c, committed 2012-01-23
- Comitter:
- gsionek
- Date:
- Mon Jan 23 14:36:17 2012 +0000
- Commit message:
- print p20 on serial
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 Mon Jan 23 14:36:17 2012 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +AnalogIn ain(p20); +Serial pc(USBTX,USBRX); + +int main() { + float val = 0; + pc.printf("c'est cool\n\r"); + while(1) { + getchar(); + val = ain*3.3; + pc.printf("%f\n\r",val); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jan 23 14:36:17 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5364839841bd