Ohnishi_Gundan / Mbed 2 deprecated Master-FM

Dependencies:   MODSERIAL mbed-rtos mbed

Fork of Master by Ohnishi_Gundan

Revision:
3:12e1f116ea42
Parent:
2:c610e1a7fbcd
Child:
8:bfcfda6b38fe
--- a/control.cpp	Thu Sep 11 15:09:05 2014 +0000
+++ b/control.cpp	Fri Sep 12 05:11:39 2014 +0000
@@ -14,6 +14,23 @@
     resetPos();    
 }
 
+void motor( char function , float power ){
+    switch(function){
+        case MOTOR_PULL :
+            pull( power );
+            break;
+        case MOTOR_LOOSE :
+            loose( power );
+            break;
+        case MOTOR_OPEN:
+            open();
+            break;
+        case MOTOR_BRAKE:
+            brake();
+            break;
+    }
+}
+
 void pull(float buf){
     Sig1 = 0;
     Sig2 = 1;
@@ -53,4 +70,10 @@
         }    
         if(pos_flag) break;
     }
+}
+
+
+void getSensor(float* _ir,float* _fsr){
+    *_ir = IR;
+    *_fsr = FSR;
 }
\ No newline at end of file