State machine

Dependencies:   mbed Adafruit_GFX BioroboticsMotorControl MODSERIAL BioroboticsEMGFilter

Revision:
14:b97e7a41ec23
Parent:
13:88967c004446
Child:
15:f65b4566193e
diff -r 88967c004446 -r b97e7a41ec23 main.cpp
--- a/main.cpp	Wed Oct 31 10:02:32 2018 +0000
+++ b/main.cpp	Wed Oct 31 10:22:07 2018 +0000
@@ -149,9 +149,9 @@
         screen.display_state_name("Normal operation");
     }
     
-    double main_target = potmeter1.read() *2 - 1;
+    double main_target = ((potmeter1.read() * 2) - 1) * PI;
     main_motor.set_target_angle(main_target);
-    double sec_target = potmeter2.read() *2 - 1;
+    double sec_target = ((potmeter2.read() * 2) - 1) * PI;
     sec_motor.set_target_angle(sec_target);
     
     if (ud_button.has_just_been_pressed()) {