Chris Styles / Mbed 2 deprecated EA_potentiometer

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Tue Mar 02 07:06:53 2010 +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
--- /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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 02 07:06:53 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0