Toyomasa Watarai
/
OM13082-Potentiometer
Example program for LPC General Purpose Shield using the Potentiometer
Diff: main.cpp
- Revision:
- 0:e12ae8f22278
--- /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); + } +}