Script of MBR Group 20. Control of robot by EMG and/or potmeters

Dependencies:   Encoder HIDScope MODSERIAL biquadFilter mbed

Fork of Script_Group_20 by Gerber Loman

Revision:
25:1c17ab3967c4
Parent:
24:847321a23e60
Child:
26:bfb1ae203c11
--- a/main.cpp	Fri Nov 03 12:12:42 2017 +0000
+++ b/main.cpp	Fri Nov 03 12:17:04 2017 +0000
@@ -528,7 +528,7 @@
 
 void MeasureAndControl(void)
 {
-    SetpointRobot(); 
+    //SetpointRobot(); 
     // RKI aanroepen
     RKI();
     // hier the control of the 1st control system
@@ -548,17 +548,17 @@
      
 void changePosition ()    // DIT MOET NOG HEEL ERG GETUNED WORDEN !!!
 {
-    if (RBF>0.3) {
-        goalx++;    // hoe veel verder gaat hij? 1 cm? 10 cm?
+    if (RBF>0.6) {
+        Rsx +=0.001;    // hoe veel verder gaat hij? 1 cm? 10 cm?
     }
-    if (RTF>0.3) {
-        goalx--;
+    if (RTF>0.6) {
+        Rsx -=0.001;
     }
-    if (LBF>0.3) {
-        goaly++;
+    if (LBF>0.6) {
+        Rsy +=0.001;
     }
-    if (LTF>0.3) {
-        goaly--;
+    if (LTF>0.6) {
+        Rsy -=0.001;
     }
     pc.printf("goalx = %i, goaly = %i\r\n",goalx, goaly);
 }