Use this to read potentiometer value

Dependencies:   mbed

Revision:
0:dd5527fbf101
diff -r 000000000000 -r dd5527fbf101 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 22 02:47:57 2016 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+PwmOut myled(LED1);
+AnalogIn mypotentiometer(p19);
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    pc.baud(115200);
+    myled.period(0.020f);
+    while(1) {
+        myled = mypotentiometer;
+        pc.printf("%f \n\r", mypotentiometer.read());
+        wait(0.1);
+    }
+}
\ No newline at end of file