State machine

Dependencies:   mbed Adafruit_GFX BioroboticsMotorControl MODSERIAL BioroboticsEMGFilter

Revision:
40:7e8d0632757c
Parent:
39:f119ca6fc821
Child:
41:8640b5782bc7
diff -r f119ca6fc821 -r 7e8d0632757c main.cpp
--- a/main.cpp	Thu Nov 01 15:41:34 2018 +0000
+++ b/main.cpp	Thu Nov 01 15:46:25 2018 +0000
@@ -223,6 +223,7 @@
         debug_forward_kinematics = true;
     }
     
+    /*
     if (debug_forward_kinematics) {
         // Using potmeters for debugging purposes;
         double main_angle = ((potmeter1.read() * 2) - 1) * PI;
@@ -260,7 +261,11 @@
     
     if (lr_button.has_just_been_pressed()) {
         debug_forward_kinematics = !debug_forward_kinematics;
-    }
+    }*/
+    
+    // Debug emg calibration.
+    led_blue = emg_1.get_is_envelope_over_threshold();
+    led_green = emg_2.get_is_envelope_over_threshold();
     
     /*
     double main_target = ((potmeter1.read() * 2) - 1) * PI;