Project Paint / Mbed 2 deprecated arm_control

Dependencies:   mbed QEI biquadFilter

Revision:
1:7d218e9d2111
Parent:
0:494acf21d3bc
Child:
5:23c850380b86
--- a/main.cpp	Mon Oct 31 13:05:53 2016 +0000
+++ b/main.cpp	Wed Nov 02 09:11:19 2016 +0000
@@ -1,5 +1,49 @@
-//#include "arm.h"
-//
-//int main() {
-//    
-//}
\ No newline at end of file
+#include "arm.h"
+
+// ====== Hardware stuff ======
+
+const PinName upperMotorControl = D6;
+const PinName upperMotorDirection = D7;
+const PinName lowerMotorControl = D5;
+const PinName lowerMotorDirection = D4;
+
+//Arm upperArm(50, upperMotorControl, upperMotorDirection);
+//Arm lowerArm(50, lowerMotorControl, lowerMotorDirection);
+
+const PinName emg1pin = A0;
+const PinName emg2pin = A1;
+
+AnalogIn emg1(emg1pin);
+AnalogIn emg2(emg2Pin);
+
+//====== Types =====
+
+enum DirectionState{UP = true, DOWN = false};
+enum ProgramState{CALIBRATING, RUNNING};
+
+//====== Program Variables ======
+
+ProgramState progState;
+DirectionState dirState;
+
+float emg1threshold;
+float emg2threshold;
+
+//====== Functions ======
+
+
+void calibrate(void) {
+    //Calibrate function.
+    //Blocks
+    
+}
+
+
+int main() {
+    progState = CALIBRATING;
+    calibrate();
+    
+    
+    while(true);
+    return 0;
+}
\ No newline at end of file