Toyomasa Watarai
/
OM13082-Potentiometer
Example program for LPC General Purpose Shield using the Potentiometer
Revision 0:e12ae8f22278, committed 2015-07-27
- Comitter:
- MACRUM
- Date:
- Mon Jul 27 09:35:37 2015 +0000
- Commit message:
- Initial commit
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 e12ae8f22278 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jul 27 09:35:37 2015 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); + +AnalogIn pot(A3); + +int main() +{ + while(1) { + pc.printf("Potentiometer = %.2f\n", (float)pot); + wait(0.3); + } +}
diff -r 000000000000 -r e12ae8f22278 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 27 09:35:37 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81 \ No newline at end of file