Minor BioRobotics BMT Hierbij publish ik mijn code public ter inspiratie voor komende jaarlagen. Het gaat om een serial robot met twee links en een haak als end-effector. Veel plezier ermee!

Dependencies:   mbed QEI HIDScope biquadFilter MODSERIAL FastPWM

Revision:
27:f5b33cbd3c22
Parent:
26:9e21ce046d4e
Child:
28:94da9cdc1f16
--- a/main.cpp	Thu Oct 31 17:24:05 2019 +0000
+++ b/main.cpp	Thu Oct 31 18:54:29 2019 +0000
@@ -53,13 +53,13 @@
     double x_max= 100; //30.5;
     double x_min= -100; //8.5;
     double x_home=8.5;
-    double x_vergroting=0.002;
+    double x_vergroting=0.02;
     
     double y = 0; // 7.5 < y < 27
     double y_max=100; //27;
     double y_min=-100; //7.5;
     double y_home=7.5;
-    double y_vergroting=0.002;
+    double y_vergroting=0.02;
     double a;
     double b;
     double c;
@@ -593,12 +593,12 @@
             led_red.write(0);
             led_green.write(1); 
             
-            motor1_calibrated=true;
-            motor2_calibrated=true;
-            emg0_threshhold=100;
-            emg1_threshhold=100;
-            emg2_threshhold=100;
-            emg3_threshhold=100;
+     //       motor1_calibrated=true;
+     //       motor2_calibrated=true;
+     //       emg0_threshhold=100;
+     //       emg1_threshhold=100;
+     //       emg2_threshhold=100;
+     //       emg3_threshhold=100;
             
             
             if (button1==0)
@@ -705,7 +705,7 @@
     led_green.write(1);
     led_red.write(1);
     led_blue.write(1);
-    State = Demo ; // veranderen naar MotorCalibration;
+    State = MotorCalibration ; // veranderen naar MotorCalibration;
     ticker_hidscope.attach(&HIDScope, 0.001); //Ticker for Hidscope, different frequency compared to motors
     ticker_mainloop.attach(&main_loop,0.001); // change back to 0.001f //Run the function main_loop 1000 times per second