Chris Styles
/
analog_test
Revision 0:9f37872de82f, committed 2009-11-02
- Comitter:
- chris
- Date:
- Mon Nov 02 12:14:51 2009 +0000
- Commit message:
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 9f37872de82f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 02 12:14:51 2009 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +#define rRatio 6.6355 +#define vRatio 3.3 + +Serial pc (USBTX,USBRX); +AnalogIn pot (p16); + +int main() { + while(1) { + float myval = pot * rRatio * vRatio; + pc.printf("myval = %.3f \n",myval); + wait(0.2); + } +} + +
diff -r 000000000000 -r 9f37872de82f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Nov 02 12:14:51 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/20a79241b4a0