shared

Dependencies:   mbed-rtos mbed

Fork of Boboobooo by kao yi

Revision:
8:089b778962c4
diff -r fe8665daf3e7 -r 089b778962c4 pot.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pot.cpp	Fri Oct 31 10:54:51 2014 +0000
@@ -0,0 +1,30 @@
+
+#include "mbed.h"
+#include "pot.h"
+
+
+
+BX_pot::BX_pot(char t){
+    
+    
+    switch (t){
+       case '1':  
+         pot_in = new AnalogIn (PTB3);
+       break;
+       case '2':
+         pot_in = new AnalogIn (PTB2);
+       break;
+    }
+    
+    
+    
+    }
+    
+ float  BX_pot::read(void){
+     
+     
+     
+  return    pot_in->read();
+     
+     
+}   
\ No newline at end of file