eindscript the slap

Dependencies:   Encoder HIDScope MODSERIAL TextLCD mbed-dsp mbed

Files at this revision

API Documentation at this revision

Comitter:
DominiqueC
Date:
Mon Nov 03 19:15:03 2014 +0000
Parent:
2:76d46ee097ef
Child:
4:305671faeb2b
Commit message:
30 graden hoek

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Nov 03 12:54:34 2014 +0000
+++ b/main.cpp	Mon Nov 03 19:15:03 2014 +0000
@@ -28,14 +28,14 @@
 #define K_D_GM (0.00000001 /TSAMP)
 #define I_LIMIT 1.
 #define RADTICKGM 0.003927
-#define THETADOT0 9.0       //oud 6.85
-#define THETADOT1 11.5      //oud7.77
-#define THETADOT2 14.0      //oud9.21
+#define THETADOT0 16  //oud 6.85
+#define THETADOT1 16  //oud 7.77
+#define THETADOT2 16  //oud 9.21
 
 TextLCD lcd(PTD2, PTA12, PTB2, PTB3, PTC2, PTA13);
 
-Encoder motor2(PTD3,PTD1); //kleine motor, geel,wit (zonder lcd:ptd2,ptd0)
-Encoder motor1(PTD5,PTD0); //grote motor, geel,wit (zonder lcd: ptd5,pta13)
+Encoder motor2(PTD3,PTD1); //geel,wit kleine motor  oud:PTD2,PTD0
+Encoder motor1(PTD5,PTD0);//geel,wit grote motor   oud:PTD5,PTA13
 PwmOut pwm_motor1(M1_PWM);
 PwmOut pwm_motor2(M2_PWM);
 DigitalOut motordir2(M2_DIR);
@@ -248,7 +248,7 @@
                 kalibratiewaarde_deltoid=(envelop_emg1/max_value_deltoid);
                 //pc.printf("deltoid %f\n\r", kalibratiewaarde_deltoid);        //WEGHALEN LATER
                 if (kalibratiewaarde_deltoid >= 0.35) {
-                    setpointkm = -127;          //11,12graden naar links
+                    setpointkm = -343.57;          //11,12 (-127)graden naar links//30 graden (-343.57) naar links
             lcd.cls();
                     lcd.locate(0,0);
                     lcd.printf("links");
@@ -258,7 +258,7 @@
                     lcd.locate(0,0);
                     lcd.printf("midden");
                 } else {
-                    setpointkm = 127;
+                    setpointkm = 343.57;
             lcd.cls();
                     lcd.locate(0,0);
                     lcd.printf("rechts");