An example program showing how to use the Potentiometer on the Embedded Artists baseboard

Dependencies:   mbed

Revision:
0:43de45cb558c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 02 07:06:53 2010 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+// Potentionmeter is on mbed p15
+// Ensure J27 is fitted
+
+AnalogIn pot (p15);
+
+Serial pc (USBTX,USBRX);
+
+int main() {
+    while(1) {
+        float ain = pot;
+        pc.printf("Analog pot voltage = %.2fv\n",ain*3.3);
+        wait(0.2);
+    }
+}