Oud verslag voor Biquad.

Dependencies:   Biquad HIDScope QEI angleandposition controlandadjust mbed

Fork of includeair by Jasper Gerth

Revision:
10:9e96d14d7034
Parent:
9:4ee354663560
Child:
11:c10651055871
--- a/main.cpp	Wed Oct 14 15:09:23 2015 +0000
+++ b/main.cpp	Wed Oct 14 15:14:59 2015 +0000
@@ -5,7 +5,7 @@
 #include "controlandadjust.h"
 
 //info out
-HIDScope scope(4);
+HIDScope scope(6);
 Ticker scope_ticker;
 const double scope_frequency=500;
 Serial pc(USBTX,USBRX);
@@ -119,9 +119,12 @@
 //gather data and send to scope
 void scopedata()
 {
-    scope.set(0,desired_angle[1]);
-    scope.set(1,counttorad*encoder2.getPulses());
-    scope.set(2,mycontroller.motor2pwm());
+    scope.set(0,desired_angle[0]);
+    scope.set(1,counttorad*encoder1.getPulses());
+    scope.set(2,mycontroller.motor1pwm());
+    scope.set(3,desired_angle[1]);
+    scope.set(4,counttorad*encoder2.getPulses());
+    scope.set(5,mycontroller.motor2pwm());
     scope.send();
 }
 //read potmeters and adjust the safetyfactor and threshold
@@ -205,11 +208,11 @@
     } else {
         led1=led2=0;
     }
-
 }
 
 void changemode()
 {
+    mycontroller.STOP();
     switchedmode=true;
     modecounter++;
     if (modecounter==3) {