Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MODSERIAL mbed-rtos mbed
Fork of Master by
Diff: control.cpp
- 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
