Oud verslag voor Biquad.

Dependencies:   Biquad HIDScope QEI angleandposition controlandadjust mbed

Fork of includeair by Jasper Gerth

Revision:
24:dd75c961ae88
Parent:
23:1c4a18799464
Child:
25:21dcd3f9eac2
--- a/main.cpp	Tue Oct 20 14:45:02 2015 +0000
+++ b/main.cpp	Tue Oct 20 15:14:40 2015 +0000
@@ -26,6 +26,7 @@
 const double PIE=3.14159265359;
 const float counttorad=((2*PIE)/cpr_shaft);// counts per rotation of the shaft
 
+
 /////////////////////////////////CALIBRATION (MODE)
 const double radpersec_calibrate=0.1*PIE;// speed of arms when in calibration mode
 int modecounter=1;//counter in which mode the robot is
@@ -40,13 +41,13 @@
 DigitalIn buttonL(D3);//left button on biorobotics shield
 
 //////////////////////////////////CONTROLLER
-const double control_frequency=25;// frequency at which the controller is called
+const double control_frequency=50;// frequency at which the controller is called
 //controller constants
 float Kp=1;
 float Ki=0.1;
 float Kd=0.001;
+controlandadjust mycontroller(6); // make a controller, value in brackets is errorband
 
-controlandadjust mycontroller; // make a controller
 Ticker control_ticker;
 
 const double Ts_control=1.0/control_frequency;
@@ -95,7 +96,7 @@
 
 //////////////////////////////// POSITION AND ANGLE SHIZZLE
 const float safetymarginfield=0.075; //adjustable, tweak for maximum but safe range
-const float mm_per_sec_emg=0.050;// move the pod 50 mm per sec if muscle is flexed
+const float mm_per_sec_emg=0.1;// move the pod 100 mm per sec if muscle is flexed
 const float y_start=0.155;//starting y position of the pod
 const float y_punch=0.473;// position to where there is punched
 const float timetoshoot=0.25;// time it can take to shoot