De hele robot in 1 keer bam

Dependencies:   mbed QEI Servo HIDScope biquadFilter MODSERIAL FastPWM

Revision:
56:3f29502fcb55
Parent:
55:a4e63ef1587c
Child:
57:d0d65376140f
--- a/main.cpp	Thu Oct 31 21:59:02 2019 +0000
+++ b/main.cpp	Thu Oct 31 23:24:53 2019 +0000
@@ -1010,13 +1010,19 @@
 
     // Do stuff until end condition is met
     static float t = 0.0;
-    Vy = 10.0f * sin(1.0f*t);
-    Vx = 0.0f;
+    Vy = 15.0f * sin(1.5f*t);
+    Vx = 0.0f * sin(1.5f*t);
     t += Ts;
 
     PID_controller();
     motorControl();
     RKI();
+    
+    scope.set(0, motor2_ref * rad2deg );
+    scope.set(1, motor2_angle * rad2deg );
+    //scope.set(2, motor2_ref );
+    //scope.set(3, motor2_angle );
+    scope.send();
 
     // State transition guard
     if ( button1_pressed == true ) { // demo_wait
@@ -1109,10 +1115,7 @@
     // Do stuff until end condition is met
     demo_state_machine();
 
-    scope.set(0, emg1 );
-    scope.set(1, Vx );
-    scope.set(2, emg2 );
-    scope.set(3, Vy );
+    
 
     // State transition guard
     if ( switch2_pressed == true ) {